attr: A wrapper for base::attr which defaults to exact matching.

View source: R/misc.utilities.R

attrR Documentation

A wrapper for base::attr which defaults to exact matching.

Description

A wrapper for base::attr which defaults to exact matching.

Usage

attr(x, which, exact = TRUE)

Arguments

x, which, exact

as in base::attr, but with exact defaulting to TRUE in this implementation

Value

as in base::attr

Examples


x <- list()
attr(x, "name") <- 10

base::attr(x, "n")

stopifnot(is.null(attr(x, "n")))

base::attr(x, "n", exact = TRUE)

statnet.common documentation built on May 31, 2023, 6:31 p.m.