R/npars.R

Defines functions npars.mcmcr npars.mcmcarray npars.mcarray

Documented in npars.mcarray npars.mcmcarray npars.mcmcr

#' @export
universals::npars

#' @inherit universals::npars
#' @inheritParams params
#' @export
npars.mcarray <- function(x, scalar = NULL, ...) {
  chk_unused(...)
  if (is.null(scalar)) {
    return(1L)
  }
  length(pars(x, scalar = scalar))
}

#' @inherit universals::npars
#' @inheritParams params
#' @export
npars.mcmcarray <- function(x, scalar = NULL, ...) {
  chk_unused(...)
  if (is.null(scalar)) {
    return(1L)
  }
  length(pars(x, scalar = scalar))
}

#' @inherit universals::npars
#' @inheritParams params
#' @export
npars.mcmcr <- function(x, scalar = NULL, ...) {
  chk_unused(...)
  if (is.null(scalar)) {
    return(length(x))
  }
  length(pars(x, scalar = scalar))
}

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.