Does the input have dimensions?

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

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

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

hasCols(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 hasDims(x)
#> [1] TRUE
hasRows(x)
#> [1] TRUE
hasCols(x)
#> [1] TRUE
## Note that dims don't have to be non-zero, just not NULL. hasDims(data.frame())
#> [1] TRUE
## FALSE ==== x <- data.frame() hasDims(list())
#> [1] FALSE #> Cause of failure: #> The dimensions of list() are NULL.
hasRows(x)
#> [1] FALSE #> Cause of failure: #> The number of rows in x is zero.
hasCols(x)
#> [1] FALSE #> Cause of failure: #> The number of columns in x is zero.