Having a registry attached to a project is very helpful for maintaining
state across R sessions without encoding everything in the unreliable
.RData
file.
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).
initialize(root = NULL)
Initialize a registry.
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) })