From 9d145922f865a47c641b35f6613f719ff6fc6b45 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 18 Apr 2024 11:17:30 -0400 Subject: [PATCH] 1 --- R/mixed_anova_2_way.R | 10 +++++----- man/mixed_anova_2_way.Rd | 5 +++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/R/mixed_anova_2_way.R b/R/mixed_anova_2_way.R index fe3b799..294dd15 100644 --- a/R/mixed_anova_2_way.R +++ b/R/mixed_anova_2_way.R @@ -44,10 +44,11 @@ #' mixed_anova_2_way( #' data = iris, iv_name_bw_group = "Species", #' repeated_measures_col_names = c("Sepal.Length", "Petal.Length")) -#' mixed_anova_2_way( +#' g1 <- mixed_anova_2_way( #' data = iris, iv_name_bw_group = "Species", #' repeated_measures_col_names = c("Sepal.Length", "Petal.Length"), -#' error_bar = "se") +#' error_bar = "se", +#' output = "plot") #' } #' @export #' @import data.table @@ -216,9 +217,8 @@ mixed_anova_2_way <- function( print(g1) if (output == "plot") { invisible(g1) - } - # return all - if (output == "all") { + } else if (output == "all") { + # return all output <- list( "desc_stats_table" = dt3, "plot" = g1) diff --git a/man/mixed_anova_2_way.Rd b/man/mixed_anova_2_way.Rd index 4cbbc1c..57d629b 100644 --- a/man/mixed_anova_2_way.Rd +++ b/man/mixed_anova_2_way.Rd @@ -78,9 +78,10 @@ Fox et al. (2020), mixed_anova_2_way( data = iris, iv_name_bw_group = "Species", repeated_measures_col_names = c("Sepal.Length", "Petal.Length")) -mixed_anova_2_way( +g1 <- mixed_anova_2_way( data = iris, iv_name_bw_group = "Species", repeated_measures_col_names = c("Sepal.Length", "Petal.Length"), - error_bar = "se") + error_bar = "se", + output = "plot") } }