powered by
Has attribute or name?
has_attr(x, which)x %has_attr% whichhas_name(x, which)x %has_name% which
x %has_attr% which
has_name(x, which)
x %has_name% which
object to test
name or attribute
# NOT RUN { has_attr(has_attr, "fail") x <- 10 x %has_attr% "a" y <- list(a = 1, b = 2) see_if(y %has_name% "c") # }
Run the code above in your browser using DataLab