Rscript_Start: Rscript_Start

Description Usage Arguments Details Value See Also

View source: R/ProcessFunctions.R

Description

This function is used to start another R script from a R script started with a RProcess module such as RProcess.

Usage

1
2
Rscript_Start(id, script, log = c(paste0("Start process with id ", id, ":"),
  script), logFile = NULL, info = NULL)

Arguments

id

chr of process id. This id will be used by RProcessFinish to watch results of this process. It defines how .*status and .*rds files for this process are named.

script

chr full path of R batch script which is to be started

log

chr arr used as log entry in case a log file exists. Each element is a line.

logFile

chr or NULL (NULL) full path of log file is needed. This log file will be used by the process started

info

ProcessInfo object or NULL (NULL). This is a list of relevant information about the process. It can be created with Rscript_Init. If NULL the global environment is searched for an object of class ProcessInfo.

Details

For correct communication with the shiny session an ProcessInfo object given (argument info). If a log file exists, it is appended with the message given in argument log. Each element is a line. If a session id exists the log is prefixed with it. If a process id exists, before writing anything the loaded process id is compared with the current one – read from the *.status file. If they do not match the R session ends with a call to quit. This ensures that, in case a newer version of the same process is running, the current one will quit and not overwrite anything.

Value

TRUE

See Also

These Rscript communication functions are used in R scripts started by a RProcess module such as RProcess. For some examples on how they work together see the vignette RProcess Module Functions.

Other Rscript communication functions: ReadInfo, Rscript_Abort, Rscript_Fin, Rscript_Init, Rscript_Log, Rscript_Try, Rscript_Up


mRcSchwering/shinyTools documentation built on May 21, 2019, 10:14 a.m.