subset.nlists {nlist} | R Documentation |
Subset nlists Object
Description
Subsets an nlists object by its parameters, chains and iterations.
Usage
## S3 method for class 'nlists'
subset(x, chains = NULL, iters = NULL, pars = NULL, ...)
Arguments
x |
An nlists object. |
chains |
An integer vector of chains. |
iters |
An integer vector of iterations. |
pars |
A character vector of parameter names. |
... |
Unused. |
Details
It can also be used to reorder the parameters as well as duplicate chains and iterations.
Value
An nlists object.
Examples
nlists <- nlists(
nlist(a = 1, y = 3, x = 1:4),
nlist(a = 2, y = 4, x = 4:1),
nlist(a = 3, y = 6, x = 5:2)
)
subset(nlists)
subset(nlists, pars = "a")
subset(nlists, pars = c("x", "a"))
subset(nlists, iters = 1L)
subset(nlists, iters = c(2L, 2L))
[Package nlist version 0.3.3 Index]