Description Usage Arguments Details Value See Also Examples
A helper function for avoiding long-running computations
if the object to be generated is either already present
or can be read from an Rda
file.
1 2 | set(name, expr, template = "%s.Rda",
env = parent.frame(), inherits = TRUE)
|
name |
Character scalar indicating the name of an object to be assigned. |
expr |
Expression that will only be evaluated if
|
template |
Character scalar with a template as used
by |
env |
Passed as |
inherits |
Passed as |
If the Rda
file name has no directory component,
it is assumed to be located in the directory given by
getOption("rda_store")
and, if this does not
exist, in the directory given by getwd()
.
An invisible returned integer code indicating what has been done.
The object already existed, nothing was done.
The result of
expr
was assigned to the object, the Rda
file mechanism was not used.
The given
Rda
file was found and its content assigned to the
object.
The given Rda
file was not
found. The result of expr
was assigned to the
object and was also stored in the given Rda
file.
base::assign base::readRDS base::saveRDS
Other coding-functions: L
,
LL
, assert
,
case
, check
, collect
,
contains
, flatten
,
listing
, map_names
,
map_values
, must
,
sql
, unnest
1 2 3 4 5 6 7 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.