swh:1:snp:2c68a6c5a8af2f06ac2c0225927f25b54fd1f9d0
Raw File
Tip revision: d2eac42f58e4e0f0d07298e8c2e719ef6a30672d authored by Dominique Makowski on 19 June 2020, 08:00:07 UTC
version 0.7.0
Tip revision: d2eac42
print.p_map.R
#' @export
print.p_map <- function(x, digits = 3, ...) {
  orig_x <- x
  if ("data_plot" %in% class(x)) {
    print(as.data.frame(x))
  } else if ("data.frame" %in% class(x)) {
    insight::print_color("# MAP-based p-value\n\n", "blue")
    print_data_frame(x, digits = digits)
  } else {
    cat(sprintf("p (MAP) = %.*f", digits, x))
  }
  invisible(orig_x)
}
back to top