Converts an MCMC object to an mcmcr-object().

as.mcmcr(x, ...)

# S3 method for mcarray
as.mcmcr(x, name = "par", ...)

# S3 method for mcmcarray
as.mcmcr(x, name = "par", ...)

# S3 method for nlist
as.mcmcr(x, ...)

# S3 method for nlists
as.mcmcr(x, ...)

# S3 method for mcmc
as.mcmcr(x, ...)

# S3 method for mcmc.list
as.mcmcr(x, ...)

# S3 method for mcmcrs
as.mcmcr(x, ...)

Arguments

x

An MCMC object.

...

Unused.

name

A string specifying the parameter name.

Value

An mcmcr object.

Methods (by class)

See also

Other coerce: as.mcarray(), as.mcmcarray(), mcmcrs()

Examples

mcmc.list <- coda::as.mcmc.list(mcmcr::mcmcr_example)
as.mcmcr(mcmc.list)
#> $alpha
#> [1] 3.718025 4.718025
#> 
#> nchains:  2 
#> niters:  400 
#> 
#> $beta
#>           [,1]     [,2]
#> [1,] 0.9716535 1.971654
#> [2,] 1.9716535 2.971654
#> 
#> nchains:  2 
#> niters:  400 
#> 
#> $sigma
#> [1] 0.7911975
#> 
#> nchains:  2 
#> niters:  400 
#>