attr: Obtain an attribute of an object without partial matching

View source: R/utils.R

attrR Documentation

Obtain an attribute of an object without partial matching

Description

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

Usage

attr(...)

Arguments

...

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

Examples

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 Sept. 17, 2024, 1:34 a.m.