objectcode: Show dependent R expressions for an object

Description Usage Arguments Details Value Author(s)

View source: R/vizcache.R

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

1
2
3

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


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