Search notes:

R: lists

Lists can be created using list()

Heterogeneous

Lists can contain elements of differing type, that is: they have different modes.
Thus, lists are also referred as generic vectors (rather than atomic vectors which are homogeneous).

Data frames

A data frame is a list whose elements are vectors or factors. These vectors/factors (obviously) have the same length. They correspond to columns of a table. Each element (= column) has a name.

Indexing

Elements in a list can be accessed by three different indexing operations.

Iterating over elements in a list

The apply function family is R's preferred way to call a function on each element of a vector or a list.

See also

unlist(…) to turn a vector into a list.

Index