Table of distinct factors (sample annotation)
Source:R/tidyMS_summarize_hierarchy.R
table_factors.RdTable of distinct factors (sample annotation)
Examples
istar <- sim_lfq_data_peptide_config()
#> creating sampleName from file_name column
#> completing cases
#> completing cases done
#> setup done
lfq <- LFQData$new(istar$data, istar$config)
xx <- table_factors(lfq$get_data(), lfq$file_name(), lfq$sample_name(), lfq$factor_keys())
xt <- xx |> dplyr::group_by(!!!rlang::syms(lfq$factor_keys())) |>
dplyr::summarize(n = dplyr::n())
stopifnot(all(xt$n == 4))