registry: A persistent on-disk cache of R objects associated with a...

Description Details Methods Examples

Description

Having a registry attached to a project is very helpful for maintaining state across R sessions without encoding everything in the unreliable .RData file.

Details

To create a registry, simply write r <- registry("some/directory"). You can then use r$set('some/key', some_value) and r$get('some/key') to set and retrieve values (arbitrary R objects).

Methods

initialize(root = NULL)

Initialize a registry.

Examples

1
2
3
4
5
6
## Not run: 
  r <- registry('some/dir') # Create "some/dir" and make a registry there.
  r$set('some/key', value <- list(1,2,3))
  stopifnot(r$get('some/key'), value)

## End(Not run)

syberia/director documentation built on May 30, 2019, 10:40 p.m.