as_nlist.mcmcr: Coerce to nlist

View source: R/as-nlist.R

as_nlist.mcmcrR Documentation

Coerce to nlist

Description

Coerce an R object to an nlist_object().

Usage

## S3 method for class 'mcmcr'
as_nlist(x, ...)

Arguments

x

An object.

...

Unused.

Value

An nlist object.

Methods (by class)

  • as_nlist(numeric): Coerce named numeric vector to nlist

  • as_nlist(list): Coerce list to nlist

  • as_nlist(data.frame): Coerce data.frame to nlist

  • as_nlist(mcmc): Coerce mcmc (with one iteration) to nlist

  • as_nlist(mcmc.list): Coerce mcmc.list (with one iteration) to nlist

See Also

Other coerce: as_nlists()

Examples

as_nlist(list(x = 1:4))
as_nlist(c(`a[2]` = 3, `a[1]` = 2))

poissonconsulting/mcmcr documentation built on Jan. 18, 2024, 1:11 a.m.