A data frame is a list with class data.frame. There are
restrictions on lists that may be made into data frames, namely
- The components must be vectors (numeric, character, or logical),
factors, numeric matrices, lists, or other data frames.
- Matrices, lists, and data frames provide as many variables to the
new data frame as they have columns, elements, or variables, respectively.
- Numeric vectors and factors are included as is, and non-numeric
vectors are coerced to be factors, whose levels are the unique values
appearing in the vector.
- Vector structures appearing as variables of the data frame must all
have the same length, and matrix structures must all have the same
row size.
Data frames may in many ways be regarded as a matrix with columns possibly
of differing modes and attributes. It may be displayed in matrix form, and
its rows and columns extracted using matrix indexing conventions.
Jeff Banfield
2/13/1998