Calls rcmd
on all files from each files'
parent directory. If the execution of any program is unsuccessful, later
programs are not executed. Command line equivalent for each run is R
CMD BATCH --no-save --no-environ --no-init-file --no-restore script.R
.
In RStudio sessions, programs can be executed as jobs so the R Console remains available.
rcb(..., scanlogs = TRUE, as_job = getOption("utilscognigen.rcb_as_job", TRUE))
file paths of R programs. Defaults to the path of the source editor context.
logical
indicating whether to execute
scanlogs
on Rout log files.
logical
indicating whether to execute as an RStudio job.
When executed as an RStudio job, rcb
invisibly returns
NULL
after submitting the job. Otherwise returns a logical
vector indicating whether each program executed successfully.
if (FALSE) { # \dontrun{
rcb("script1.R", "script2.R")
} # }