default: Default 'hashmap' values

Description Usage Arguments Details Value Author(s) Examples

View source: R/generics.R

Description

These generics are used to get or set the default value of an hashmap, optionally returned upon query of a missing key.

Usage

1
2
3
4
5
6
7
8
9
default(x)

default(x) <- value

## S3 method for class 'r2r_hashmap'
default(x)

## S3 replacement method for class 'r2r_hashmap'
default(x) <- value

Arguments

x

an hashmap.

value

an arbitrary R object. Default value to be associated to missing keys in the hashmap.

Details

For more details, see the hashtable documentation page.

Value

an arbitrary R object.

Author(s)

Valerio Gherardi

Examples

1
2
3
m <- hashmap()
default(m)
default(m) <- 840

r2r documentation built on July 6, 2021, 5:12 p.m.