Learn R Programming

nlist (version 0.4.0)

as_mcmc: Coerce to mcmc Object

Description

Coerce an R object to an mcmc object.

Usage

as_mcmc(x, ...)

# S3 method for mcmc.list as_mcmc(x, ...)

# S3 method for nlist as_mcmc(x, ...)

# S3 method for nlists as_mcmc(x, ...)

Value

An mcmc object.

Arguments

x

An object.

...

Unused.

Methods (by class)

  • as_mcmc(mcmc.list): Coerce an mcmc.list object to an mcmc object.

  • as_mcmc(nlist): Coerce an nlist object to an mcmc object.

  • as_mcmc(nlists): Coerce an nlists object to an mcmc object.

See Also

coda::as.mcmc()

Other mcmc: as_mcmc_list()

Examples

Run this code
as_mcmc(as_mcmc_list(nlists(nlist(x = 2), nlist(x = 3))))
as_mcmc(nlist(x = matrix(1:6, 2)))
as_mcmc(nlists(
  nlist(x = matrix(1:6, 2)),
  nlist(x = matrix(3:8, 2))
))

Run the code above in your browser using DataLab