conda_run2 | R Documentation |
This function runs a command in a chosen conda environment.
conda_run2(
cmd,
args = c(),
conda = "auto",
envname = NULL,
cmd_line = paste(shQuote(cmd), paste(args, collapse = " ")),
intern = FALSE,
echo = !intern
)
cmd |
The system command to be invoked, as a character string. |
args |
A character vector of arguments to the command. The arguments should
be quoted e.g. by |
conda |
The path to a |
envname |
The name of, or path to, a conda environment. |
cmd_line |
The command line to be executed, as a character string. This
is automatically generated from |
intern |
A logical (not |
echo |
A logical (not |
Note that, whilst the syntax is similar to system2()
, the function
dynamically generates a shell script with commands to activate the chosen
conda environent. This avoids issues with quoting, as discussed in this
GitHub issue.
conda_run2()
runs a command in the desired conda environment. If
intern = TRUE
the output is returned as a character vector; if intern = FALSE
(the
deafult), then the return value is the error code (0 for success). See
shell()
(on windows) or system2()
on macOS or Linux for more details.
conda-tools
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.