as_mcmc: Coerce to mcmc Object

View source: R/as-mcmc.R

as_mcmcR Documentation

Coerce to mcmc Object

Description

Coerce an R object to an mcmc object.

Usage

as_mcmc(x, ...)

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

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

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

Arguments

x

An object.

...

Unused.

Value

An mcmc object.

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

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))
))

nlist documentation built on June 8, 2025, 9:41 p.m.