diff --git a/R/ancova.R b/R/ancova.R index 4b9f3175..56e0df8c 100644 --- a/R/ancova.R +++ b/R/ancova.R @@ -885,18 +885,18 @@ AncovaInternal <- function(jaspResults, dataset = NULL, options) { } if (options$postHocTypeStandard) - .anovaPostHocTable(postHocContainer, dataset, options, anovaContainer[["model"]]$object, anovaContainer[["afexModel"]]$object) + .anovaStandardPostHocTable(postHocContainer, dataset, options, anovaContainer[["model"]]$object, anovaContainer[["afexModel"]]$object) if (options$postHocTypeGames) - .anovaGamesTable(postHocContainer, dataset, options, anovaContainer[["model"]]$object) + .anovaGamesPostHocTable(postHocContainer, dataset, options, anovaContainer[["model"]]$object) if (options$postHocTypeDunnet) - .anovaDunnettTable(postHocContainer, dataset, options, anovaContainer[["model"]]$object) + .anovaDunnettPostHocTable(postHocContainer, dataset, options, anovaContainer[["model"]]$object) return() } -.anovaPostHocTable <- function(postHocContainer, dataset, options, model, afexModel = NULL) { +.anovaStandardPostHocTable <- function(postHocContainer, dataset, options, model, afexModel = NULL) { if (!is.null(postHocContainer[["postHocStandardContainer"]])) return() @@ -958,8 +958,8 @@ AncovaInternal <- function(jaspResults, dataset = NULL, options) { isBetween = TRUE)) avFootnote <- attr(resultPostHoc[[1]], "mesg")[grep(attr(resultPostHoc[[1]], "mesg"), pattern = "Results are averaged")] if (length(avFootnote) != 0) { - avTerms <- .unv(strsplit(gsub(avFootnote, pattern = "Results are averaged over the levels of: ", replacement = ""), - ", ")[[1]]) + avTerms <- strsplit(gsub(avFootnote, pattern = "Results are averaged over the levels of: ", replacement = ""), + ", ")[[1]] postHocStandardContainer[[thisVarNameRef]]$addFootnote(gettextf("Results are averaged over the levels of: %s", paste(avTerms, collapse = ", "))) } allPvalues <- do.call(cbind, lapply(resultPostHoc, function(x) x$p.value)) @@ -1098,7 +1098,7 @@ AncovaInternal <- function(jaspResults, dataset = NULL, options) { } -.anovaGamesTable <- function(postHocContainer, dataset, options, model) { +.anovaGamesPostHocTable <- function(postHocContainer, dataset, options, model) { if (!is.null(postHocContainer[["postHocGamesContainer"]])) return() @@ -1197,7 +1197,7 @@ AncovaInternal <- function(jaspResults, dataset = NULL, options) { return() } -.anovaDunnettTable <- function(postHocContainer, dataset, options, model) { +.anovaDunnettPostHocTable <- function(postHocContainer, dataset, options, model) { if (!is.null(postHocContainer[["postHocDunnettContainer"]])) return() diff --git a/R/anovarepeatedmeasures.R b/R/anovarepeatedmeasures.R index 6387a15b..6df27b13 100644 --- a/R/anovarepeatedmeasures.R +++ b/R/anovarepeatedmeasures.R @@ -1000,8 +1000,8 @@ AnovaRepeatedMeasuresInternal <- function(jaspResults, dataset = NULL, options) if (any(postHocVariables[[postHocVarIndex]] %in% allNames)) { ## If the variable is a repeated measures factor - resultPostHoc[["scheffe"]] <- "" - resultPostHoc[["tukey"]] <- "" + resultPostHoc[["scheffe"]] <- "." + resultPostHoc[["tukey"]] <- "." if (options$postHocCorrectionScheffe || options$postHocCorrectionTukey) { cors <- paste(c("Tukey", "Scheffe")[c(options$postHocCorrectionTukey, options$postHocCorrectionScheffe)], collapse = " and ") @@ -1024,7 +1024,7 @@ AnovaRepeatedMeasuresInternal <- function(jaspResults, dataset = NULL, options) postHocContainer[[thisVarNameRef]]$addFootnote(gettextf("Results are averaged over the levels of: %s", paste(avTerms, collapse = ", "))) } - if (options[["postHocConditionalTable"]]) { + if (options[["postHocConditionalTable"]] & isFALSE(is.null(byVariable))) { resultPostHoc[[".isNewGroup"]] <- !duplicated(resultPostHoc[[byVariable[termIndex]]]) } else { resultPostHoc[[".isNewGroup"]] <- !duplicated(resultPostHoc[["contrast_A"]]) diff --git a/R/commonAnovaFreq.R b/R/commonAnovaFreq.R index be130652..828b3db5 100644 --- a/R/commonAnovaFreq.R +++ b/R/commonAnovaFreq.R @@ -142,7 +142,7 @@ confAdjust <- strsplit(confAdjust, " ")[[1]][1] if (!includeCI) { - correctionFootnote <- gettextf("P-value adjusted for comparing a family of %s", as.character(nEstimates)) + correctionFootnote <- gettextf("P-value adjusted for comparing a family of %s estimates.", as.character(nEstimates)) } else if (isFALSE(includeEffectSize) || isFALSE(isBetween)) { correctionFootnote <- gettextf("P-value and confidence intervals adjusted for comparing a family of %1$s estimates (confidence intervals corrected using the %2$s method).", nEstimates, confAdjust) } else {