dict_operators: Access or replace values of a dictionary

Description Usage Arguments Details

Description

Access or replace one or multiple values of a dictionary using keys.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## S3 method for class 'dict'
dict[[key]]

## S3 method for class 'dict'
dict$key

## S3 replacement method for class 'dict'
dict$key <- value

## S3 replacement method for class 'dict'
dict[[key]] <- value

## S3 method for class 'dict'
dict[...]

## S3 replacement method for class '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).


stefano-meschiari/dict documentation built on May 30, 2019, 10:44 a.m.