Skip to content

Commit

Permalink
fix: return invisible value for summary methods
Browse files Browse the repository at this point in the history
  • Loading branch information
johannes-titz committed Dec 6, 2023
1 parent 84f3583 commit 50c3fb6
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions R/summary_methods.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@
#' with the elements Lambdas, tTable, FTable, Effects.
#'
#' @export
summary.cofad_bw <- function(object, type = "Contrast Analysis Between", ...) {
summary.cofad_bw <- function(object, ...) {
x <- object
type <- ifelse(class(object) == "cofad_bw", "Contrast Analysis Between",
"Contrast Analysis Mixed")
s <- x$sig
# round everything to 3 digits, except p value, which shows 3 sig digits
f_tab <- matrix(c(
Expand Down Expand Up @@ -42,7 +44,7 @@ summary.cofad_bw <- function(object, type = "Contrast Analysis Between", ...) {
print(out[1:2], na.print = "")
cat("\u2460The p-value refers to a one-tailed test.\n\n")
print(out[3:4], na.print = "")
return(out)
invisible(out)
}
#' Summary of within subject design contrast analysis
#'
Expand Down Expand Up @@ -80,7 +82,7 @@ summary.cofad_wi <- function(object, ci = .95, ...) {
print(out[1:2], na.print = "")
cat("\u2460The p-value refers to a one-tailed test.\n\n")
print(out[3], na.print = "")
return(out)
invisible(out)
}

#' Summary of a mixed design contrast analysis
Expand All @@ -92,5 +94,5 @@ summary.cofad_wi <- function(object, ci = .95, ...) {
#' with the elements Lambdas, tTable, FTable, Effects.
#' @export
summary.cofad_mx <- function(object, ...) {
summary.cofad_bw(object, type = "Contrast Analysis Mixed", ...)
summary.cofad_bw(object, ...)
}

0 comments on commit 50c3fb6

Please sign in to comment.