get(key, ...)
(character(1)
, ...) -> any
Retrieves object with key key
from the dictionary.
Additional arguments must be named and are passed to the constructor of the stored object.
mget(keys, ...)
(character()
, ...) -> named list()
Returns objects with keys keys
in a list named with keys
.
Additional arguments must be named and are passed to the constructors of the stored objects.
has(keys)
character()
-> logical()
Returns a logical vector with TRUE
at its i-th position if the i-th key exists.
keys(pattern = NULL)
character(1)
-> character()
Returns all keys which comply to the regular expression pattern
.
If pattern
is NULL
(default), all keys are returned.
add(key, value, ..., required_args = character())
(character(1)
, any
, ..., character()
) -> self
Adds object value
to the dictionary with key key
, potentially overwriting a previously stored item.
Additional arguments in ...
must be named and are passed as default arguments to value
during construction.
The names of all additional arguments which are mandatory for construction and missing in ...
should be listed in required_args
.
remove(keys)
character()
-> self
Removes objects with keys keys
from the dictionary.
required_args(key)
(character(1)
) -> character()
Returns the names of arguments required to construct the object.