Combination of most common “macro-level” functions that describe an object.
Value
A list with following elements:
- properties
A data frame with the class(es), type, mode and storage mode of the object as well as the dim, length and object.size.
- attributes.lengths
A named character vector giving all attributes (c.f. “names”, “row.names”, “class”, “dim”, and so forth) along with their length.
- extensive.is
A character vector of all the identifier functions. (starting with “is.”) that yield
TRUEwhen used withxas argument.
Details
An alternative to calling in turn class, typeof,
dim, and so on. A call to this function will readily give all
this information at once.
See also
class, typeof, mode,
storage.mode, dim, length,
is.object, object.size
Author
Dominic Comtois, dominic.comtois@gmail.com
Examples
what.is(1)
#> Checking object against known 'is...' functions (54)
#> $properties
#> property value
#> 1 class numeric
#> 2 typeof double
#> 3 mode numeric
#> 4 storage.mode double
#> 5 dim
#> 6 length 1
#> 7 is.object FALSE
#> 8 object.size 56 Bytes
#>
#> $extensive.is
#> [1] "is.atomic" "is.double" "is.finite"
#> [4] "is.finite.POSIXlt" "is.numeric" "is.vector"
#>
what.is(NaN)
#> Checking object against known 'is...' functions (54)
#> $properties
#> property value
#> 1 class numeric
#> 2 typeof double
#> 3 mode numeric
#> 4 storage.mode double
#> 5 dim
#> 6 length 1
#> 7 is.object FALSE
#> 8 object.size 56 Bytes
#>
#> $extensive.is
#> [1] "is.atomic" "is.double" "is.na" "is.nan"
#> [5] "is.nan.POSIXlt" "is.numeric" "is.vector"
#>
what.is(iris3)
#> Checking object against known 'is...' functions (54)
#> $properties
#> property value
#> 1 class array
#> 2 typeof double
#> 3 mode numeric
#> 4 storage.mode double
#> 5 dim 50 x 4 x 3
#> 6 length 600
#> 7 is.object FALSE
#> 8 object.size 5816 Bytes
#>
#> $attributes.lengths
#> dim dimnames
#> 3 3
#>
#> $extensive.is
#> [1] "is.array" "is.atomic" "is.double" "is.numeric" "is.unsorted"
#>
what.is(print)
#> Checking object against known 'is...' functions (54)
#> $properties
#> property value
#> 1 class function
#> 2 typeof closure
#> 3 mode function
#> 4 storage.mode function
#> 5 dim
#> 6 length 1
#> 7 is.object FALSE
#> 8 object.size 1240 Bytes
#>
#> $extensive.is
#> [1] "is.function" "is.recursive"
#>
what.is(what.is)
#> Checking object against known 'is...' functions (54)
#> $properties
#> property value
#> 1 class function
#> 2 typeof closure
#> 3 mode function
#> 4 storage.mode function
#> 5 dim
#> 6 length 1
#> 7 is.object FALSE
#> 8 object.size 169808 Bytes
#>
#> $extensive.is
#> [1] "is.function" "is.recursive"
#>