Functionality to manage code chunks from a vignette
These functions allow for processing and management of vignette code chunks within R. Users can directly manipulate the code chunks, as well as evaluate them at their option.
getVignetteCode(vigPath, evalEnv = new.env()) editVignetteCode(vigCode, pos, code)
File path of vignette file to process
An environment to use for chunk evaluations
The position of the code chunk to edit
The new code chunk
getVignetteCode: This function will call
tangleToR driver in order to retrieve the code chunks from
the specified vignette file. It will then compile the other pertinent
information and return a new
editVignetteCode: This function will edit a code chunk
contained within a
vignetteCode and return a new object
representing that change. The evaluation environment in the new
object is a copy of the original as well, *not* the same environment.