Description Usage Arguments Details Value Author(s) See Also
Sources and removes code in the hot/ and src/hot/ directories, that is, directories named hot/ in both the current
job directory as well as the common src/ directory, making it possible
either patch specific jobs or all jobs. If not put in a directory
named 'global', the code will be sourced into the calling environment,
which typically is "inside" the onRun()
function.
WARNING: By default, hot plugin files that were sourced, are removed afterward!
By calling this method repetably in onRun(job)
,
say, in the main iteration loop, it is possible to update code while
a job is running.
One situation where this has been found to be useful is when it takes
literally days to process a job and when almost done you have been
told that there will be a power-shut before you job finishes. By
plugging in new code this way, you can save you current session and
shut it down nicely to be continued later. Note, there is currently
now methods provided by R.batch
that does this for you; you
have to implement reloading etc. yourself.
Errors that occurs while sourcing the hot code, for instance syntax errors but also evaluation errors, are skipped with a warning and recorded in the log file. This way you will not killa process by misstake that have been running for days.
Note that code in hot/ and src/hot/ will also be source by
*setup()
on startup.
1 2 | ## S3 method for class 'Job'
sourceHotCode(this, remove=TRUE, envir=getEnvironment(this), ...)
|
remove |
If |
envir |
The |
... |
Not used. |
All scripts files are evaluated with source()
to the
local working environment of this job. That is, no global
objects will be overwritten.
Returns (invisibly) a vector
of the files sourced.
Henrik Bengtsson (http://www.braju.com/R/)
*run()
.
For more information see Job
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.