https://github.com/cran/bayestestR
Revision 4936034770c69a8db2855f46f578e34116ffa383 authored by Dominique Makowski on 20 October 2019, 06:20:02 UTC, committed by cran-robot on 20 October 2019, 06:20:02 UTC
1 parent e1fa15d
Tip revision: 4936034770c69a8db2855f46f578e34116ffa383 authored by Dominique Makowski on 20 October 2019, 06:20:02 UTC
version 0.4.0
version 0.4.0
Tip revision: 4936034
print.p_direction.R
#' @export
print.p_direction <- function(x, digits = 2, ...) {
if ("data_plot" %in% class(x)) {
print(as.data.frame(x))
} else if ("data.frame" %in% class(x)) {
.print_pd(x, digits, ...)
} else {
cat(sprintf("pd = %s%%", insight::format_value(x * 100, digits = digits)))
}
}
#' @keywords internal
.print_pd <- function(x, digits, ...) {
insight::print_color("# Probability of Direction (pd)\n\n", "blue")
x$Parameter <- as.character(x$Parameter)
x$pd <- sprintf("%s%%", insight::format_value(x$pd * 100, digits = digits))
print_data_frame(x, digits = digits)
}
Computing file changes ...