Rscript_Try: Rscript_Try

Description Usage Arguments Details Value See Also

View source: R/ProcessFunctions.R


This function is used to recover an error in a R script run by a RProcess module such as RProcess. In general, if the R script runs into an error its shiny session will never know about it. This functions, reports this error to the shiny session and writes a log if desired.


Rscript_Try(expr, ignore = FALSE, info = NULL)



R expression to be evaluated


bool (FALSE) whether the script should continue after an error occured


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.


For correct communication with the shiny session an ProcessInfo object given (argument info). If a log file exists, it is appended with the error message. 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.


NULL (if error occured) or result of evaluated expr

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_Up

mRcSchwering/shinyTools documentation built on May 21, 2017, 4:43 p.m.