Learn R Programming

mcmcr (version 0.6.1)

as_nlist.mcmcr: Coerce to nlist

Description

Coerce an R object to an nlist_object().

Usage

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

Arguments

x

An object.

...

Unused.

Value

An nlist object.

Methods (by class)

  • numeric: Coerce named numeric vector to nlist

  • list: Coerce list to nlist

  • data.frame: Coerce data.frame to nlist

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

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

See Also

Other coerce: as_nlists()

Examples

Run this code
# NOT RUN {
as_nlist(list(x = 1:4))
as_nlist(c(`a[2]` = 3, `a[1]` = 2))
# }

Run the code above in your browser using DataLab