swh:1:snp:2c68a6c5a8af2f06ac2c0225927f25b54fd1f9d0
Raw File
Tip revision: 6acd4f1707b182a2cbe2f4a4c2d4196571d36eb3 authored by Dominique Makowski on 05 December 2020, 08:30:02 UTC
version 0.8.0
Tip revision: 6acd4f1
print.mhdior.R
#' @export
print.mhdior <- function(x, digits = 2, ...) {
  orig_x <- x
  if ("data_plot" %in% class(x)) {
    print(as.data.frame(x))
  } else if ("data.frame" %in% class(x)) {
    insight::print_color("# Max HDI inside/outside ROPE (MHDIOR)\n\n", "blue")
    print_data_frame(x, digits = digits)
  } else {
    cat(sprintf("MHDIOR = %.*f%%", digits, x * 100))
  }
  invisible(orig_x)
}
back to top