Description Usage Arguments Details Value Note See Also
Evaluate and check R expressions in a cached analysis
1 2 | runcode(num, env = parent.frame(), forceAll = FALSE)
checkcode(num, env = globalenv())
|
num |
expression sequence number |
env |
environment in which expressions should be evaluated |
forceAll |
logical, should we load cached expressions when possible or evaluate all expressions? |
checkcode
will evaluate each R expression in the source file on
the user's local machine and compare any resulting outputs to the
corresponding objects stored in the cache. If the outputs do not match (in
the sense that all.equal
returns something other than
TRUE
), then a message is printed indicating the failure to
verify the output and the messages from all.equal
are provided
to the user. Otherwise, checkcode
will print OK
for
that expression and move to the next expression.
Neither runcode
nor checkcode
return anything useful.
Objects involving character values (such as factors) may be subject to
collating rules that are specific to the user's local environment.
Therefore, if objects are recreated on a user's local machine and
compared with the same object in the cache (which was presumably
created on a different machine), checkcode
may report a
verification failure because of the change in locale.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.