statnet.common (version 4.9.0)

attr: 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)

Value

as in base::attr

Arguments

x, which, exact

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

Examples

Run this code

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

base::attr(x, "n")

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

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

Run the code above in your browser using DataLab