Skip to contents

Combine two MCMC Objects

Usage

# S4 method for MCMC,MCMC
cbind2(x, y)

Arguments

x, y

An MCMC object.

Value

An MCMC object.

See also

Other mutators: mutator, sort(), subset()

Author

N. Frerebeau

Examples

## Events
(eve <- as_events(events, calendar = "CE", iteration = 1))
#> <EventsMCMC>
#> - Number of events: 4
#> - Time scale: CE

eve[1:1000, ] # Select the first 1000 iterations
#> <EventsMCMC>
#> - Number of events: 4
#> - Time scale: CE
eve[, 1:2]    # Select the first 2 events
#> <EventsMCMC>
#> - Number of events: 2
#> - Time scale: CE

cbind2(eve[, 1:2], eve[, 3:4]) # Combine two MCMC objects
#> <MCMC>
#> - Number of events: 4
#> - Time scale: CE
sort(eve, decreasing = TRUE)   # Sort events in descending order
#> <EventsMCMC>
#> - Number of events: 4
#> - Time scale: CE

## Phases
(pha <- as_phases(phases, start = c(1, 3), calendar = "CE", iteration = 1))
#> <PhasesMCMC>
#> - Number of phases: 2
#> - Time scale: CE

pha[1:1000, , ]          # Select the first 1000 iterations
#> <PhasesMCMC>
#> - Number of phases: 2
#> - Time scale: CE
pha[, 1, , drop = FALSE] # Select the first phase
#> <PhasesMCMC>
#> - Number of phases: 1
#> - Time scale: CE