runcode: Evaluate cached R expressions

Description Usage Arguments Details Value Note See Also

View source: R/vizcache.R

Description

Evaluate and check R expressions in a cached analysis

Usage

1
2
runcode(num, env = parent.frame(), forceAll = FALSE)
checkcode(num, env = globalenv())

Arguments

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?

Details

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.

Value

Neither runcode nor checkcode return anything useful.

Note

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.

See Also

code, showcode


rdpeng/cacher documentation built on May 27, 2019, 3:06 a.m.