subset.listof {spatstat} | R Documentation |
Extract or replace a subset of a list of things.
## S3 method for class 'listof': x[i] ## S3 method for class 'listof': x[i] <- value
x |
An object of class "listof" representing a list of things
which all belong to one class.
|
i |
Subset index. Any valid subset index in the usual R sense. |
value |
Replacement value for the subset. |
These are subset methods for the class "listof"
.
The argument x
should be an object of class "listof"
representing a list of things that all belong to one class.
The methods extract or replace a designated
subset of x
, and return an object of class "listof"
.
Another object of class "listof"
.
Adrian Baddeley adrian@maths.uwa.edu.au http://www.maths.uwa.edu.au/~adrian/ and Rolf Turner rolf@math.unb.ca http://www.math.unb.ca/~rolf
x <- list(A=runif(10), B=runif(10), C=runif(10)) class(x) <- c("listof", class(x)) x[1:2] x[1] <- list(A=rnorm(10))