Learn R Programming

icesTAF (version 1.3-2)

sourceTAF: Run TAF Script

Description

Run a TAF script and return to the original directory. Optionally start with an empty workspace.

Usage

sourceTAF(script, rm = TRUE, quiet = FALSE)

Arguments

script

script filename.

rm

whether to remove all objects from the global environment before the script is run.

quiet

whether to suppress messages reporting progress.

By default, TAF scripts are run with rm = TRUE to make sure each script starts with an empty workspace.

Value

Invisible TRUE or FALSE, indicating whether the script ran without errors.

See Also

source is the base function to run R scripts.

make runs a TAF script if needed.

sourceAtoZ runs all TAF scripts in a directory.

icesTAF-package gives an overview of the package.

Examples

Run this code
# NOT RUN {
write("print(pi)", "script.R")
source("script.R")
sourceTAF("script.R")
file.remove("script.R")
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab