.BG
.FN list
.FN is.list
.FN as.list
.TL
List Objects
.CS
list(...)
is.list(x)
as.list(x)
.AG ...
any arguments, with any names.
.PP
.AG x
any S object.
.RT
`list' returns an object of mode list, with as many elements as there are
arguments.
The individual arguments become the elements of the list, and the argument
names, if any, are the corresponding elements of the names attribute of
the list.
.PP
`is.list' returns `TRUE' if `x' is a simple object of mode list, and
`FALSE' otherwise.
.PP
`as.list' returns `x' if `x' is a simple object of mode list, and
otherwise a list object of the same length as `x'.
If `x' is an atomic object, the elements of the list will be objects of
length 1, containing the individual elements of `x'.
If `x' is a recursive object, its elements will be unchanged.
.SH NOTE
The constructor function for lists is different from those for atomic
modes, which take the desired length as an argument.
To generate a list of length 10, when you don't initially know what
the elements should be:
.Cs
vector("list", 10)
.Ce
Lists are simple objects (see `vector') when they have no attributes,
other than `names'.
It is possible, for example, to have a matrix, array or time-series of mode
list.
.EX
list(original = x, square = x^2)
as.list(1:10) # ten integer elements
.KW classes
.WR
