Rscript_Up: Rscript_Up

Description Usage Arguments Details Value See Also

View source: R/ProcessFunctions.R

Description

This function is used to in a R script run by a RProcess module such as RProcess to communicate status updates to its shiny session.

Usage

1
2
Rscript_Up(progress, log = paste("Progress update to", progress),
  info = NULL)

Arguments

progress

num > 0 and < 1 indicating progress

log

chr arr used as initial log entry for this process (paste("Progress update to", progress)). Each element is a line.

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

A progess update might be used by a RProcess module in the shiny session to provide a progress bar. In addition, a log entry about the progress update is written in case a log file was defined. This information is taken from the ProcessInfo object.

Information about path of the log file, the session id and the process id is taken from the ProcessInfo object. If a log file exists, it is appended by the lines defined with log. Each element of log is a line. If a session id exists, every line 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

list of class ProcessInfo. This list contains information about the current process and is used by other functions of this module.

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_Start, Rscript_Try


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