
Get the result of a glystats analysis
get_tidy_result.RdSyntax sugar for $tidy_result and $raw_result elements of a glystats result object.
It's useful to be used in pipes.
Examples
library(glyexp)
library(glyclean)
library(dplyr)
#>
#> Attaching package: ‘dplyr’
#> The following object is masked from ‘package:glyexp’:
#>
#> select_var
#> The following objects are masked from ‘package:stats’:
#>
#> filter, lag
#> The following objects are masked from ‘package:base’:
#>
#> intersect, setdiff, setequal, union
exp <- auto_clean(real_experiment) |>
glyexp::slice_head_var(n = 10)
#> ℹ Normalizing data (Median)
#> ✔ Normalizing data (Median) [8ms]
#>
#> ℹ Removing variables with >50% missing values
#> ✔ Removing variables with >50% missing values [16ms]
#>
#> ℹ Imputing missing values
#> ℹ Sample size <= 30, using sample minimum imputation
#> ℹ Imputing missing values
#> ✔ Imputing missing values [16ms]
#>
#> ℹ Aggregating data
#> ✔ Aggregating data [976ms]
#>
#> ℹ Normalizing data again
#> ✔ Normalizing data again [16ms]
#>
# Using a pipe
sig_res <- exp |>
gly_anova() |>
get_tidy_result("main_test") |>
filter(p_adj < 0.05)
#> ℹ Number of groups: 4
#> ℹ Groups: "H", "M", "Y", and "C"
#> ℹ Pairwise comparisons will be performed, with levels coming first as reference groups.
# Equivalent to
anova_res <- gly_anova(exp)
#> ℹ Number of groups: 4
#> ℹ Groups: "H", "M", "Y", and "C"
#> ℹ Pairwise comparisons will be performed, with levels coming first as reference groups.
sig_res <- anova_res$tidy_result$main_test |>
filter(p_adj < 0.05)