R/nterms.R

Defines functions nterms.mcmcrs nterms.mcmcr nterms.mcmcarray

Documented in nterms.mcmcarray nterms.mcmcr nterms.mcmcrs

#' @export
universals::nterms

#' @inherit universals::nterms
#' @export
nterms.mcmcarray <- function(x, ...) as.integer(prod(dim(x)[-(1:2)]))

#' @inherit universals::nterms
#' @export
nterms.mcmcr <- function(x, ...) sum(vapply(x, nterms, 1L))

#' @inherit universals::nterms
#' @export
nterms.mcmcrs <- function(x, ...) nterms(x[[1]])

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.