Each data structure has several attributes which describe it.
Although these attributes are normally invisible to users (e.g., not
printed to the screen when one types the name of the object), there are
several helpful functions that display particular attributes:
- For arrays, dims() returns the size of each dimension.
- For arrays, is() returns the scalar value type and
specific type of array (vector, matrix, array). For more complex data
structures, is() returns the default methods (classes) for that object.
- For lists and data frames, names() returns the variable
names, and str() returns the variable names and a short
description of each element.
For almost all data types, you may use summary() to get summary
statistics.
Gary King
2011-11-29