Skip to contents

Does the input have dimnames?

Usage

hasDimnames(x)

hasColnames(x)

Arguments

x

Object.

Value

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

Note

Updated 2023-09-29.

See also

  • hasRownames().

  • assertive.properties::has_dimnames().

  • assertive.properties::has_colnames().

Examples

## TRUE ====
x <- datasets::mtcars
hasDimnames(x)
#> [1] TRUE
hasRownames(x)
#> [1] TRUE
hasColnames(x)
#> [1] TRUE

## FALSE ====
x <- data.frame()
hasDimnames(x)
#> [1] FALSE
hasRownames(x)
#> [1] FALSE
hasColnames(x)
#> [1] FALSE