https://github.com/cran/bayestestR
Raw File
Tip revision: 40f7c88ddf855896018cf20ec8a7ac5fbd0ea2fb authored by Dominique Makowski on 27 January 2020, 05:30:28 UTC
version 0.5.1
Tip revision: 40f7c88
print.describe_posterior.R
#' @importFrom insight format_table
#' @export
print.describe_posterior <- function(x, digits = 3, ...) {
  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)
  }
}
back to top