R/print.dynLong.R

Defines functions print.dynLong

#' @keywords internal
#' @export
print.dynLong <- function(x, digits = max(4, getOption("digits") - 4), ...) {

  if (!inherits(x, "dynLong")) {
    stop("Use only with 'dynLong' objects.\n")
  }

  out <- lapply(x$pred, round, digits = digits)
  print(out)

  if (x$type == "simulated") {
    cat(paste0("\nM-H acceptance rate: ", round(100 * x$accept, 1), "%"))
  }

  cat("\n")
  invisible(x)

}

Try the joineRML package in your browser

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

joineRML documentation built on Jan. 22, 2023, 1:18 a.m.