Run a TAF script and return to the original directory.
source.taf(script, rm = FALSE, clean = TRUE, detach = FALSE, taf = NULL, quiet = FALSE)
whether to remove all objects from the global environment before and after the script is run.
whether to detach all non-base packages before running the script, to ensure that the script is not affected by packages that may have been attached outside the script.
a convenience flag where
whether to suppress messages reporting progress.
The default value of
rm = FALSE is to protect users from accidental
loss of work, but the TAF server always runs with
rm = TRUE to make
sure that only files, not objects in memory, are carried over between
Likewise, the TAF server runs with
clean = TRUE to make sure that the
script starts with a clean directory. The target directory of a TAF script
has the same filename prefix as the script:
data.R creates ‘data’
FALSE, indicating whether the script ran without
Commands within a script (such as
setwd) may change the working
source.taf guarantees that the working directory
getwd() is the same before and after running a script.
source is the base function to run R scripts.
make.taf runs a TAF script if needed.
source.all runs all TAF scripts in a directory.
TAF-package gives an overview of the package.
## Not run: write("print(pi)", "script.R") source("script.R") source.taf("script.R") file.remove("script.R") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.