[ top | up ]

Lists

Usage

list(...)
as.list(x)
is.list(x)

Description

The arguments to list are of the form value or tag=value. The function returns a list composed of its arguments with each value either tagged or untagged, depending on how the argument was specified.

as.list attempts to coerce its argument to list type.

is.list returns TRUE if its argument is a list and FALSE otherwise.

To create an empty list it is necessary to use the function vector with a mode of "list".

See Also

vector.

Examples

data(cars)
# create a plotting structure
pts <- list(x=cars[,1], y=cars[,2])
plot(pts)