dict: Dictionary

Description Usage Details

View source: R/dict.R

Description

A dictionary (hash map) data structure. The keys must be strings and the values can be any R object.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
dict(...)

as_dict(x)

keys(d)

values(d)

has_key(d, k)

del(d, k)

get_default(d, k, default = NULL)

set_default(d, k, default = NULL)

Details

The dict data type is a thin wrapper around an R environment. Unlike most R types, it is mutable and has pass-by-reference semantics.

The dict interface is also implemented for lists, which can serve as immutable dictionaries (with linear time lookup).


IBM/rflowgraph documentation built on Sept. 12, 2019, 7:45 p.m.