create interaction column from factors
Examples
xx <- data.frame(A = c("a","a","a"), B = c("d","d","e"))
x <- make_interaction_column(xx, c("B","A"))
x <- make_interaction_column(xx, c("A"))
bb <- prolfqua::sim_lfq_data_protein_config()
#> creating sampleName from file_name column
#> completing cases
#> completing cases done
#> setup done
config <- bb$config
analysis <- bb$data
config$factor_depth <- 1
make_interaction_column(analysis,
config$factor_keys_depth())
#> # A tibble: 120 × 9
#> sample sampleName group_ isotopeLabel protein_Id abundance qValue nrPeptides
#> <chr> <chr> <chr> <chr> <chr> <dbl> <dbl> <dbl>
#> 1 A_V1 A_V1 A light 0EfVhX~0087 20.1 0 3
#> 2 A_V1 A_V1 A light 7cbcrd~5725 22.0 0 1
#> 3 A_V1 A_V1 A light 9VUkAq~4703 19.8 0 1
#> 4 A_V1 A_V1 A light BEJI92~5282 21.2 0 2
#> 5 A_V1 A_V1 A light CGzoYe~2147 29.4 0 1
#> 6 A_V1 A_V1 A light DoWup2~5896 NA NA NA
#> 7 A_V1 A_V1 A light Fl4JiV~8625 20.1 0 4
#> 8 A_V1 A_V1 A light HvIpHG~9079 21.7 0 2
#> 9 A_V1 A_V1 A light JcKVfU~9653 34.5 0 7
#> 10 A_V1 A_V1 A light SGIVBl~5782 23.9 0 6
#> # ℹ 110 more rows
#> # ℹ 1 more variable: interaction <fct>