objectcode {cacher}R Documentation

Show dependent R expressions for an object

Description

Given the name of an R object or set of R objects, show the R expressions on which those objects depend and return the indices for those R expressions in the document. Alternatively, evaluate the sequence of R expressions that give rise to an R object.

Usage

objectcode(name, num, show = TRUE)
evalobject(name, num, env = parent.frame(), ...)
loadobject(name, num, env = parent.frame())

Arguments

name character vector of names of variables
num a vector of expression sequence numbers
show Should the expressions be printed to the screen?
env environment in which evaluation should occur
... other arguments passed to runcode

Details

These functions depend on the CodeDepends package for computing the dependencies. If it is not installed, an error will be thrown.

The loadobject function loads the cached value of the expression in which the object is found. It is possible that the cached value of the expression will contain more objects than just the named object, in which case all objects will be loaded.

Value

objectcode returns a vector of indices indicating the expression sequence numbers for the R expressions. evalobject returns nothing but evaluates R expressions in the specified environment.

Author(s)

Roger D. Peng rpeng@jhsph.edu


[Package cacher version 1.1 Index]