View source: R/run_statdecide.R
| run_statdecide | R Documentation |
Automatically checks normality, selects appropriate test (ANOVA or Kruskal-Wallis), performs post-hoc, and visualizes results with compact letter display (CLD). Returns all results as an object with optional console output.
run_statdecide(data, dep_var, group_vars, cld_offset = 5, verbose = TRUE)
data |
A data frame. |
dep_var |
Character. Name of the dependent variable. |
group_vars |
Character vector. One or two grouping variables. |
cld_offset |
Numeric. Vertical offset to place CLD labels above the boxplot (default: 5). |
verbose |
Logical. Whether to print progress messages and results (default: TRUE). |
A list containing:
Results of Shapiro-Wilk test
Results for each main effect
Interaction results (if 2 group_vars)
List of ggplot objects
Faceted ggplot (if 2 group_vars)
Heatmap ggplot (if 2 group_vars)
# Silent operation
results <- run_statdecide(data = df_nonparam, dep_var = "Pollen",
group_vars = c("Month","Time"), verbose = FALSE)
# With console output
run_statdecide(data = df_nonparam, dep_var = "Pollen", group_vars = "Month")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.