swh:1:snp:2c68a6c5a8af2f06ac2c0225927f25b54fd1f9d0
Raw File
Tip revision: 9985109256c08d654edb46adb9cb20c913fb1888 authored by Dominique Makowski on 29 May 2019, 14:10:02 UTC
version 0.2.0
Tip revision: 9985109
print.p_rope.R
#' @export
print.p_rope <- function(x, digits = 2, ...) {
  if ("data_plot" %in% class(x)) {
    print(as.data.frame(x))
  } else {
    insight::print_color("# ROPE-based p-value\n\n", "blue")

    if ("data.frame" %in% class(x)) {
      pars <- format(x$Parameter)
      pmap <- format(sprintf("%.*f%%", digits, x$p_ROPE), justify = "right")
      cat(paste0("  ", pars, ": ", pmap, collapse = "\n"))
    } else {
      cat(sprintf("p (ROPE) = %.*f%%", digits, x))
    }
  }
}
back to top