subset.list {asremlPlus} | R Documentation |
Forms a list
that contains a subset of the components of the supplied
list
.
Description
Select components of a list
specified by a list of numbers or names,
or by a logical indicating for each component of the list whether or not it is to
be retained.
Usage
## S3 method for class 'list'
subset(x, select = 1:length(x), ...)
Arguments
x |
An |
select |
A |
... |
further arguments passed to or from other methods. Not used at present. |
Value
A list
with just the subset of the components from x
. If the
components of x
are named, then these names are retained in the subset
list
.
Author(s)
Chris Brien
See Also
Examples
x <- list(1:3,letters[1:3],LETTERS[1:3])
y <- subset.list(x, select = c(1,3))
y <- subset.list(x, select = c(TRUE,FALSE,TRUE))
names(x) <- LETTERS[1:3]
y <- subset.list(x, select = c(1,3))
z <- subset.list(x, select = LETTERS[c(1,3)])
x <- list(1:3,letters[1:3],LETTERS[1:3])
names(x)[c(1,3)] <- LETTERS[c(1,3)]
z <- subset.list(x, select = c(1,2))
v <- subset.list(x)
[Package asremlPlus version 4.4.35 Index]