| 1 |
% Generated by roxygen2: do not edit by hand |
| 2 |
% Please edit documentation in R/utils.R |
| 3 |
\name{attr2} |
| 4 |
\alias{attr2} |
| 5 |
\title{Obtain an attribute of an object without partial matching} |
| 6 |
\usage{ |
| 7 |
attr2(...) |
| 8 |
} |
| 9 |
\arguments{ |
| 10 |
\item{...}{Passed to \code{\link[base:attr]{base::attr()}} (without the \code{exact} argument).} |
| 11 |
} |
| 12 |
\description{ |
| 13 |
An abbreviation of \code{\link[base:attr]{base::attr}}\code{(exact = TRUE)}. |
| 14 |
} |
| 15 |
\examples{ |
| 16 |
z = structure(list(a = 1), foo = 2) |
| 17 |
base::attr(z, "f") # 2 |
| 18 |
xfun::attr2(z, "f") # NULL |
| 19 |
xfun::attr2(z, "foo") # 2 |
| 20 |
} |