R Basics

R object types

Here, for more experienced users, is a list of a few of the more important object types.
Vector:
a one-dimensional array of arbitrary length. Subsets of the vector may be referenced. All elements of the vector must be of the same type--numerical, character, etc.
Matrix:
a two-dimensional array with an arbitrary number of rows and columns. Subsets of the matrix may be referenced, and individual rows and columns of the matrix may be handled as vectors. Again all elements of the matrix must be of the same type.
Array:
as a matrix, but of arbitrary dimension.
Data frame:
a set of data organised similarly to a matrix. However each column of the data frame may contain its own type of data. Columns typically correspond to variables in a statistical study, while rows correspond to observations of these variables. A data frame may be handled similarly to a matrix, and individual columns of the data frame may be handled as vectors.
Function:
see Section .
List:
an arbitrary collection of other R objects (which may include other lists).