shell | R Documentation |
Invoke a command in the system command-line shell
shell(
command,
args = character(),
env = NULL,
wd = getwd(),
print = TRUE,
stderrFile = NULL,
stdoutFile = NULL,
stderrToStdout = FALSE,
returnStdout = FALSE
)
command |
|
args |
|
env |
|
wd |
|
print |
|
stdoutFile, stderrFile |
|
stderrToStdout |
|
returnStdout |
|
Invisible list
.
Contains named elements:
"status"
, "stdout"
, "stderr"
, "timeout"
.
Updated 2023-11-04.
processx::run()
.
base::system2()
, our previously used legacy approach.
x <- shell(
command = "printf",
args = c("%s\n", "hello", "world"),
print = TRUE
)
print(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.