get-methods: Get elements from an object

Description Usage Arguments Value

Description

Extracts a set of <key, value> pairs. For hashmaps mappings from

f: keys -> values,

exist so argument which is per default values (since these are going to be retrieved). For bimaps also

f: values -> keys,

mappings exist, such that which can also be keys if the keys from the object should be retrieved.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
get(obj, x, which = c("values", "keys"))

## S4 method for signature 'bimap,vector,character'
get(obj, x, which = c("values", "keys"))

## S4 method for signature 'bimap,vector,missing'
get(obj, x)

## S4 method for signature 'unordered_map,vector,missing'
get(obj, x)

Arguments

obj

object to extract values from

x

the set of keys to match the values

which

choose either values if the values should get returned or keys if the keys should get returned

Value

returns extracted keys or values from obj


datastructures documentation built on March 18, 2018, 1:55 p.m.