Does the input have names?

hasNames(x, .xname = getNameInParent(x))

Arguments

x

Object.

.xname

Name of object defined in x. Not intended to be used directly.

Value

TRUE on success; FALSE on failure, with cause set.

Note

Updated 2019-08-10.

See also

Examples

## TRUE ==== hasNames(datasets::mtcars)
#> [1] TRUE
## FALSE ==== hasNames(matrix())
#> [1] FALSE #> Cause: The names of 'matrix()' are NULL.
hasNames(data.frame())
#> [1] FALSE #> Cause: The names of 'data.frame()' are all empty.