Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

has_any_attributes

Does the input have any attributes?


Description

Checks to see if the input has any attributes.

Usage

has_any_attributes(x, .xname = get_name_in_parent(x))

has_no_attributes(x, .xname = get_name_in_parent(x))

Arguments

x

Input to check.

.xname

Not intended to be used directly.

Value

has_any_attributes returns TRUE if attributes(x) has length greater than zero. has_attributes returns a logical vector that is TRUE whenever the specified attribute is not NULL.

Note

There are no corresponding assert functions, since they overlap too closely with the assertions for has_attributes.

See Also

has_attributes to check for specific attributes.

Examples

has_any_attributes(matrix())
has_no_attributes(data.frame())

assertive.properties

Assertions to Check Properties of Variables

v0.0-4
GPL (>= 3)
Authors
Richard Cotton [aut, cre]
Initial release
2016-12-29

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.