R: Obtain most common information on data structures.
what.is
R Documentation
Obtain most common information on data structures.
Description
Takes any object as argument and returns (1) a dataframe with the class(es), type, mode and storage mode of the object as well as the dim, length and object.size; (2) a character vector of all the identifier functions (starting with "is.") that yield TRUE with the provided object; (3) a named character vector giving all attributes (for instance, "names", "row.names", "class", "dim", and so on) along with their lengths.
When TRUE, all logical results from the “is.” identifier functions will be displayed, accompanied by a warning when only the result applies only to the first element in the structure. FALSE by default.
ignore.size.warn
Set to TRUE to force execution of the function for large (>20 K bytes) objects. Defaults to FALSE.
Details
The function is an attempt to centralize the most common “macro-level” functions that describe the data at hand. Instead of calling, in turn, class, typeof, dim, and so on, a single call to what.is will readily give all that information.
Value
A list with 3 named items: “obj.properties” containing class, typeof, mode, storage.mode, dim and length; “identifiers” containing the “is.” identifier functions that yield TRUE; “attributes” containing the names and lengths of attributes; optionally, a 4th item with all the identifier test results (when argument show.all=TRUE)