Description Usage Details Value Author(s) Examples
These functions are used to debug command-line executable Rscripts in R sessions
1 | setDebug()
|
setDebug
sets the environmental variable RIBIOS_SCRIPT_DEBUG
as TRUE
. unsetDebug
unsets the variable. isDebugging
checks whether the variable is set or not. isIntDebugging
tests
whether the scripts runs interactively or runs in the debugging mode. The
last one can be useful when debugging Rscript in a R session.
A programmer wishing to debug a Rscript can explicitly set (or unset) the
RIBIOS_SCRIPT_DEBUG
variable in order to activate (inactivate)
certain trunks of codes. This can be automated via isDebugging
, or
probably more conveniently, by isIntDebugging
: if the script runs in
an interactive mode, or the debugging flag is set, the function returns
TRUE
.
setDebug
and unsetDebug
returns an invisible value
indicating whether the variable setting (unsetting) was successful.
isDebugging
and isIntDebugging
returns logical values.
Jitao David Zhang <jitao_david.zhang@roche.com>
1 2 3 4 5 6 7 | unsetDebug()
print(isDebugging())
setDebug()
print(isDebugging())
unsetDebug()
print(isDebugging())
print(isIntDebugging())
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.