make_dict: Create a new dictionary from a list or vector of keys and...

Description Usage Arguments Value Examples

View source: R/dict.r

Description

Create a new dictionary from separate keys and values.

Usage

1

Arguments

keys

a vector of character keys

values

a vector or list of values to be associated to the corresponding keys

default

a default value for the dictionary (see default_dict)

strict

whether the dictionary should be strict and raise an exception when a non-existing key is accessed (see strict_dict)

Value

a new dictionary

Examples

1
employee <- make_dict(c('name', 'age'), list('John', 60))

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