Learn R Programming

mcmcr (version 0.6.2)

as_nlist.mcmcr: Coerce to nlist

Description

Coerce an R object to an nlist_object().

Usage

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

Value

An nlist object.

Arguments

x

An object.

...

Unused.

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

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

Run the code above in your browser using DataLab