has_attr {assertthat}R Documentation

Has attribute or name?

Description

Has attribute or name?

Usage

has_attr(x, which)

x %has_attr% which

has_name(x, which)

x %has_name% which

Arguments

x

object to test

which

name or attribute

Examples

has_attr(has_attr, "fail")
x <- 10
x %has_attr% "a"

y <- list(a = 1, b = 2)
see_if(y %has_name% "c")

[Package assertthat version 0.2.1 Index]