https://github.com/cran/bayestestR
Raw File
Tip revision: 01482dc32c49cc56111762e704c854b5f287966a authored by Dominique Makowski on 20 April 2020, 05:10:28 UTC
version 0.6.0
Tip revision: 01482dc
print.describe_posterior.R
#' @importFrom insight format_table
#' @export
print.describe_posterior <- function(x, digits = 3, ...) {
  orig_x <- x
  if ("data_plot" %in% class(x)) {
    cat(insight::format_table(as.data.frame(x), digits = digits))
  } else {
    insight::print_color("# Description of Posterior Distributions\n\n", "blue")
    if (!is.null(attributes(x)$ci_method) && tolower(attributes(x)$ci_method) == "si") {
      cn <- gsub("^CI", "SI", colnames(x))
      colnames(x) <- cn
    }
    print_data_frame(x, digits = digits)
  }
  invisible(orig_x)
}
back to top