Data Frames Data frames are a class of objects to represent data which are usually used in fitting models. They are similar to matrices in that the variables can be treated as columns and the observations as rows. Splus has a library of datasets available with which to experiment. One of these, cu.summary, contains data from Consumer Reports' yearly automobile issue. Suppose the table above is recorded in a text file called cars .
T is specified.
T will let Splus know that the first line is a header line and should be ignored. Variables in data frames can be anything that is indexed by the set of rows. Character or logical vectors are converted into factors, matrices contribute one variable per column in the matrix, lists contribute one variable for each component of the list, applied recursively, and the variables in data frames become variables in the new data frame. Numeric vectors, factors, and ordered factors each contribute a single variable. Suppose we have a model which predicts cholesterol values by systolic blood pressure and age.