Learn R Programming

nlist (version 0.1.1)

subset.nlist: Subset nlist Object

Description

Subsets an nlist object by its parameters.

Usage

# S3 method for nlist
subset(x, pars = NULL, ...)

Arguments

x

An nlist object.

pars

A character vector of parameter names.

...

Unused.

Value

An nlist object.

Details

It can also be used to reorder the parameters.

Examples

Run this code
# NOT RUN {
nlist <- nlist(a = 1, y = 3, x = 1:4)
subset(nlist)
subset(nlist, "a")
subset(nlist, c("x", "a"))
# }

Run the code above in your browser using DataLab