this should reduce the overall variance.
Examples
bb <- sim_lfq_data_peptide_config(Nprot = 100)
#> creating sampleName from file_name column
#> completing cases
#> completing cases done
#> setup done
lfqdata <- LFQData$new(bb$data, bb$config)
lfqdata <- lfqdata$get_Transformer()$log2()$lfq
#> Column added : log2_abundance
s1 <- get_robscales(lfqdata)
res <- scale_with_subset(lfqdata, lfqdata)
#> Joining with `by = join_by(sampleName, isotopeLabel, protein_Id, peptide_Id)`
cfg <- lfqdata$get_config()$clone(deep = TRUE)
cfg$set_response(res$colname)
lfqres <- LFQData$new(res$data, cfg)
s2 <- get_robscales(lfqres)
stopifnot(abs(mean(s1$mads) - mean(s2$mads)) < 1e-6)