Description Usage Arguments Details See Also
View source: R/ProcessFunctions.R
This function is used to terminate a R script run by a RProcess module such as RProcess
.
It will send a error message to the shiny session and end the R session with quit
.
This way it can be used to make quality checks before handing data back to the shiny session.
1 | Rscript_Abort(status, log = c("Process aborts:", status), info = NULL)
|
status |
|
log |
|
info |
ProcessInfo object or |
As in Rscript_Fin
progress in the *.status
file is set to 1, signalling the shiny session that the script has finished.
However, the status parameter in this file is filled with an error message.
The shiny session will not read the output of the R script but instead render the error message.
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.
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_Fin
, Rscript_Init
,
Rscript_Log
, Rscript_Start
,
Rscript_Try
, Rscript_Up
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.