Table of distinct factors (sample annotation)
Table of distinct factors (sample annotation)
table_factors(pdata, configuration)
table_factors(pdata, configuration)Other configuration:
AnalysisConfiguration,
AnalysisParameters,
AnalysisTableAnnotation,
INTERNAL_FUNCTIONS_BY_FAMILY,
R6_extract_values(),
complete_cases(),
concrete_AnalysisConfiguration,
make_interaction_column(),
make_reduced_hierarchy_config(),
sample_subset(),
separate_factors(),
separate_hierarchy(),
setup_analysis(),
spread_response_by_IsotopeLabel(),
table_factors_size()
Other configuration:
AnalysisConfiguration,
AnalysisParameters,
AnalysisTableAnnotation,
INTERNAL_FUNCTIONS_BY_FAMILY,
R6_extract_values(),
complete_cases(),
concrete_AnalysisConfiguration,
make_interaction_column(),
make_reduced_hierarchy_config(),
sample_subset(),
separate_factors(),
separate_hierarchy(),
setup_analysis(),
spread_response_by_IsotopeLabel(),
table_factors_size()
istar <- sim_lfq_data_peptide_config()
#> creating sampleName from fileName column
#> completing cases
#> completing cases done
#> setup done
xx <- table_factors(istar$data,istar$config )
xx
#> # A tibble: 12 × 3
#> sample sampleName group_
#> <chr> <chr> <chr>
#> 1 A_V1 A_V1 A
#> 2 A_V2 A_V2 A
#> 3 A_V3 A_V3 A
#> 4 A_V4 A_V4 A
#> 5 B_V1 B_V1 B
#> 6 B_V2 B_V2 B
#> 7 B_V3 B_V3 B
#> 8 B_V4 B_V4 B
#> 9 Ctrl_V1 Ctrl_V1 Ctrl
#> 10 Ctrl_V2 Ctrl_V2 Ctrl
#> 11 Ctrl_V3 Ctrl_V3 Ctrl
#> 12 Ctrl_V4 Ctrl_V4 Ctrl
xt <- xx |> dplyr::group_by(!!!rlang::syms(istar$config$table$factor_keys())) |>
dplyr::summarize(n = dplyr::n())
xt
#> # A tibble: 3 × 2
#> group_ n
#> <chr> <int>
#> 1 A 4
#> 2 B 4
#> 3 Ctrl 4
stopifnot(all(xt$n == 4))
istar <- sim_lfq_data_peptide_config()
#> creating sampleName from fileName column
#> completing cases
#> completing cases done
#> setup done
xx <- table_factors(istar$data,istar$config )
xx
#> # A tibble: 12 × 3
#> sample sampleName group_
#> <chr> <chr> <chr>
#> 1 A_V1 A_V1 A
#> 2 A_V2 A_V2 A
#> 3 A_V3 A_V3 A
#> 4 A_V4 A_V4 A
#> 5 B_V1 B_V1 B
#> 6 B_V2 B_V2 B
#> 7 B_V3 B_V3 B
#> 8 B_V4 B_V4 B
#> 9 Ctrl_V1 Ctrl_V1 Ctrl
#> 10 Ctrl_V2 Ctrl_V2 Ctrl
#> 11 Ctrl_V3 Ctrl_V3 Ctrl
#> 12 Ctrl_V4 Ctrl_V4 Ctrl
xt <- xx |> dplyr::group_by(!!!rlang::syms(istar$config$table$factor_keys())) |>
dplyr::summarize(n = dplyr::n())
xt
#> # A tibble: 3 × 2
#> group_ n
#> <chr> <int>
#> 1 A 4
#> 2 B 4
#> 3 Ctrl 4
stopifnot(all(xt$n == 4))