Skip to content

Commit

Permalink
fix: mixed print use between
Browse files Browse the repository at this point in the history
  • Loading branch information
johannes-titz committed Dec 6, 2023
1 parent 8937d69 commit 84f3583
Showing 1 changed file with 1 addition and 25 deletions.
26 changes: 1 addition & 25 deletions R/print_methods.R
Original file line number Diff line number Diff line change
Expand Up @@ -65,29 +65,5 @@ print.cofad_wi <- function(x, ...) {
#' contrastweights, the corresponding group and an effectsize are given.
#' @export
print.cofad_mx <- function(x, ...) {
lambda <- signif(x[[3]], 4)
contr_1 <- paste(
paste(names(lambda), "=", lambda, collapse = "; "),
collapse = NULL
)
p_value <- signif(x[[1]][2], 4)
p_value <- paste("; p = ", p_value, sep = "")
p <- paste("F(1,", x[[1]][4], ") = ", round(x[[1]][1], 3), p_value, sep = "")
# within lambdas
lambda <- signif(x[[4]], 4)
contr_2 <- paste(
paste(names(lambda), "=", lambda, collapse = "; "),
collapse = NULL
)
r_effect <- round(x[[5]][1], 3)
opposite <- ifelse(
r_effect < 0,
"Attention: Contrast fits in the opposite direction!",
""
)
cat("\nWe ran a contrast analysis for the following between contrasts: ",
contr_1, " and within contrasts: ", contr_2, sep = "")
cat(". This resulted in statistics of ", p,
" and an effect magnitude of r_effectsize = ", r_effect, ". ",
opposite, sep = "")
print.cofad_bw(x)
}

0 comments on commit 84f3583

Please sign in to comment.