Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions R/helpers-mcmc.R
Original file line number Diff line number Diff line change
Expand Up @@ -277,12 +277,8 @@ validate_chain_list <- function(x) {
abort("Each chain should have the same number of iterations.")
}

cnames <- sapply(x, colnames)
if (is.array(cnames)) {
same_params <- identical(cnames[, 1], cnames[, 2])
} else {
same_params <- length(unique(cnames)) == 1
}
cnames <- lapply(x, colnames)
same_params <- all(vapply(cnames[-1], identical, logical(1), cnames[[1]]))
Comment thread
utkarshpawade marked this conversation as resolved.
if (!same_params) {
abort(paste(
"The parameters for each chain should be in the same order",
Expand Down
Loading