R/as-nlists.R

Defines functions as_nlists.mcmcr

Documented in as_nlists.mcmcr

#' @export
nlist::as_nlists

#' @inherit nlist::as_nlists
#' @export
as_nlists.mcmcr <- function(x, ...) {
  chk_identical(nchains(x), 1L)
  x <- lapply(1:niters(x), FUN = subset_iteration_mcmcr, x)
  x <- lapply(x, set_class, "nlist")
  set_class(x, "nlists")
}

Try the mcmcr package in your browser

Any scripts or data that you put into this service are public.

mcmcr documentation built on Sept. 7, 2021, 1:07 a.m.