Description
This function installs or replaces external language script or model file in Vantage.
On success, it prints a message that the file is installed or replaced.
Note: This function is not supported with ODBC driver connection.
Usage
td_install_file(
file.path.loc = NULL,
file.identifier = NULL,
file.on.client = TRUE,
is.binary = FALSE,
replace = FALSE,
force.replace = FALSE,
...
)
Arguments
file.path.loc |
Required Argument. |
file.identifier |
Required Argument. |
file.on.client |
Optional Argument. |
is.binary |
Optional Argument. |
replace |
Optional Argument. |
force.replace |
Optional Argument. |
... |
Any additional parameters required for the function. |
Value
None. Prints message if the operation is successful.
See Also
td_remove_file
Examples
# Note:
# 1. Connection must be established before running these examples.
# 2. File can be on client or remote database server.
# 3. Files mentioned in the examples are part of the package and can be found at
# package install location as shown in the below examples.
# Replace "<tdplyr_install_location>" with the absolute path of the install location of the
# tdplyr library. One can get this location using '.libPaths()'.
# Make sure to include 'tdplyr' in the path. For example, <r_pkg_install_location>/tdplyr.
tdplyr_install_location <- "<tdplyr_install_location>"
# Example 1: Install the file 'mapper.R' found at the path mentioned in "file.path.loc"
# argument.
td_install_file(file.path.loc = file.path(tdplyr_install_location, "scripts", "mapper.R"),
file.identifier = 'mapper')
# Example 2: Install the binary file 'binary_file.dms' found at the path mentioned in
# "file.path.loc" argument.
td_install_file(file.path.loc = file.path(tdplyr_install_location, "scripts",
"binary_file.dms"),
file.identifier = 'binaryfile',
file.on.client = TRUE,
is.binary = TRUE)
# Example 3: Replace the file 'mapper.R' with 'mapper_replace.R' found at the path mentioned
# in "file.path.loc" argument.
td_install_file(file.path.loc = file.path(tdplyr_install_location, "scripts", "mapper_replace.R"),
file.identifier = 'mapper',
file.on.client = TRUE,
is.binary = FALSE,
replace = TRUE,
force.replace = TRUE)