R/zzz-methods-posterior.R

Defines functions `as_draws.measr::measrdcm`

#' @importFrom posterior as_draws
#' @export
posterior::as_draws

#' @export
`as_draws.measr::measrdcm` <- function(x, ...) {
  if (S7::S7_inherits(x@backend, rstan) && S7::S7_inherits(x@method, optim)) {
    return(posterior::as_draws(t(as.matrix(x@model$par))))
  }

  posterior::as_draws(x@model, ...)
}

Try the measr package in your browser

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

measr documentation built on Jan. 14, 2026, 5:08 p.m.