set_pars.nlist: Set Parameter Names

Description Usage Arguments Details Value See Also Examples

View source: R/set-pars.R

Description

Sets an object's parameter names.

The assignment version pars<-() forwards to set_pars().

Usage

1
2
## S3 method for class 'nlist'
set_pars(x, value, ...)

Arguments

x

An object.

value

A character vector of the new parameter names.

...

Other arguments passed to methods.

Details

value must be a unique character vector of the same length as the object's parameters.

Value

The modified object.

See Also

Other parameters: npars(), pars()

Examples

1
2
3
4
nlist <-  nlist(x = 1, y = 3:4)
pars(nlist) <- c("a", "b")
nlist
set_pars(nlist, c("z", "c1"))

nlist documentation built on Sept. 5, 2021, 6:05 p.m.