Does the input have dimnames?

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

Arguments

x

Object.

.xname

Not intended to be used directly.

Value

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

See also

Examples

## TRUE ==== x <- datasets::mtcars hasDimnames(x)
#> [1] TRUE
#> [1] TRUE
#> [1] TRUE
## FALSE ==== x <- data.frame() hasDimnames(x)
#> [1] FALSE #> Cause of failure: #> The dimension names of x are all empty.
#> [1] FALSE #> Cause of failure: #> x has sequence row names (soft NULL).
#> [1] FALSE #> Cause of failure: #> The column names of x are all empty.