attr: Obtain an attribute of an object without partial matching

Description Usage Arguments Examples

View source: R/utils.R

Description

An abbreviation of base::attr(exact = TRUE).

Usage

1

Arguments

...

Passed to base::attr() (without the exact argument).

Examples

1
2
3
4
z = structure(list(a = 1), foo = 2)
base::attr(z, "f")  # 2
xfun::attr(z, "f")  # NULL
xfun::attr(z, "foo")  # 2

yihui/xfun documentation built on Oct. 25, 2018, 11:44 p.m.