This function will create a new object with the name as name
in the environment where it is called. This is intended to be your package
environment, but could potentially be anywhere you want. If an object which
is not a cnd:registry
object is found with the same name, an error will be
thrown.
Usage
cnd_create_registry(
registry = get_package(),
overwrite = FALSE,
name = ".__CND_REGISTRY__.",
env = parent.frame()
)
Examples
# In most cases, just having the function in your R/ scripts is good enough,
# and you can use `cnd_create_registry()` with its defaults. The following
# examples are for demonstration purposes:
e <- new.env()
cnd_create_registry("EXAMPLE", env = e)
cnd_create_registry("EXAMPLE", overwrite = TRUE)