has_attr.Rd
Has attribute or name?
has_attr(x, which) x %has_attr% which has_name(x, which) x %has_name% which
object to test
name or attribute
has_attr(has_attr, "fail") #> [1] TRUE x <- 10 x %has_attr% "a" #> [1] FALSE y <- list(a = 1, b = 2) see_if(y %has_name% "c") #> [1] FALSE #> attr(,"msg") #> [1] "y does not have all of these name(s): 'c'"