Checks if object has "tabular" structure (not to confuse with table) - in this particular case, that means matrix and data.frame objects only.
Arguments
- x
an object to be checked for "tabular" format
Value
a logical value indicating that provided object has tabular structure
Examples
is.tabular(HairEyeColor[, , 1]) # [1] TRUE
#> [1] FALSE
is.tabular(mtcars) # [1] TRUE
#> [1] TRUE
is.tabular(table(mtcars$cyl)) # [1] FALSE
#> [1] FALSE
is.tabular(rnorm(100)) # [1] FALSE
#> [1] FALSE
is.tabular(LETTERS) # [1] FALSE
#> [1] FALSE
is.tabular(pi) # [1] FALSE
#> [1] FALSE