evals options, just run this function
without any parameters provided. To query only one value,
pass the first parameter. To set that, use the
value parameter too.evalsOptions(o, value)evals options are available:
parse: ifTRUEthe providedtxtelements would be merged into one string and
parsed to logical chunks. This is useful if you would
want to get separate results of your code parts - not
just the last returned value, but you are passing the
whole script in one string. To manually lock lines to
each other (e.g. calling aplotand on next line
adding anablineortextto it), use a plus
char (+) at the beginning of each line which
should be evaluated with the previous one(s). If set toFALSE,evalswould not try to parse R code,
it would get evaluated in separate runs - as provided.
Please see examples ofevals.cache: caching the result of R calls if set toTRUEcache.mode: cached results could
be stored in anenvironmentincurrentR
session or let it be permanent ondisk.cache.dir: path to a directory holding cache files
ifcache.modeset todisk. Default to.cachein current working directory.cache.time: number of seconds to limit caching
based onproc.time. If set to0, all R
commands, if set toInf, none is cached (despite
thecacheparameter).cache.copy.images: copy images to new files if an
image is returned from cache? If set toFALSE(default) the "old" path would be returned.classes: a vector or list of classes which should
be returned. If set toNULL(by default) all R
objects will be returned.hooks: list of
hooks to be run for given classes in the form oflist(class = fn). If you would also specify some
parameters of the function, a list should be provided in
the form oflist(fn, param1, param2=NULL)etc. So
the hooks would becomelist(class1=list(fn, param1,
param2=NULL), ...). See examples ofevals.
A default hook can be specified too by setting the class
to'default'. This can be handy if you do not want
to define separate methods/functions to each possible
class, but automatically apply the default hook to all
classes not mentioned in the list. You may also specify
only one element in the list like:hooks=list('default' = pander.return). Please
note, that nor error/warning messages, nor stdout is
captured (so: updated) while running hooks!length: any R object exceeding the specified
length will not be returned. The default value
(Inf) does not filter out any R objects.output: a character vector of required returned
values. This might be useful if you are only interested
in theresult, and do not want to save/see e.g.messagesorprintedoutput. See
examples ofevals.graph.unify: shouldevalstry to unify the
style of (base,latticeandggplot2)
plots? If set toTRUE, somepanderOptions()would apply. By default this is disabled not to freak out
useRs :)graph.name: set the file name of
saved plots which istempfileby default. A
simple character string might be provided where%dwould be replaced by the index of the
generatingtxtsource,%nwith an
incremented integer ingraph.dirwith similar file
names and%tby some random characters. A
function's name to beevaluated can be passed here
too.graph.dir: path to a directory where
to place generated images. If the directory does not
exist,evalstry to create that. Default
set toplotsin current working directory.graph.output: set the required file format of
saved plots. Currently it could be any ofgrDevices:png,bmp,jpeg,jpg,tiff,svgorpdf.width: width of generated plot in pixels for even
vector formatsheight: height of generated
plot in pixels for even vector formatsres:
nominal resolution inppi. The height and width of
vector images will be calculated based in this.hi.res: generate high resolution plots also? If
set toTRUE, each R code parts resulting an image
would be run twice.hi.res.width: width of
generated high resolution plot in pixels for even vector
formats. Theheightandresof high
resolution image is automatically computed based on the
above options to preserve original plot aspect ratio.graph.env: save the environments in which
plots were generated to distinct files (based ongraph.name) withenvextension?graph.recordplot: save the plot viarecordPlotto distinct files (based ongraph.name) withrecodplotextension?graph.RDS: save the raw R object returned
(usually withlatticeorggplot2) while
generating the plots to distinct files (based ongraph.name) withRDSextension?evals panderOptionsevalsOptions()
evalsOptions('cache')
evalsOptions('cache', FALSE)Run the code above in your browser using DataLab