dict_operators: Access or replace values of a dictionary
Description
Access or replace one or multiple values of a dictionary using keys.
Usage
"[["(dict, key)
"$"(dict, key)
"$"(dict, key) <- value
"[["(dict, key) <- value
"["(dict, ...)
"["(dict, ...) <- value
Arguments
dict
object from which to access value(s) or in which to replace value(s)
key,
... index or indices specifying the value to access or replace
value
list or vector of value(s) to replace
Details
These operators work equivalently to the list operators [
, [[
and $
.
These operators do not partially match keys. Additionally, assigning NULL
to one
of the keys does not remove the entry from the dictionary; instead, it sets the value
corresponding to that key to NULL
(use omit to remove entries).