Description Usage Arguments Value
Replace the measurements of every metabolite by the residuals from
regressing the metabolite on x
, where x
is converted
to a factor.
1 | correct_for_factor(mat, x)
|
mat |
Matrix with samples as columns and metabolites as rows |
x |
Factor for which to correct the metabolite measurements in
|
A matrix of the same dimensions as mat
where every
metabolite's measurements were replaced by the residuals from
regressing the metabolite on the x
treated as a factor.
If a metabolite consists only of NAs, the residuals for that
metabolite will also be NAs. The same happens when a
metabolite has no valid variance (because there is only a
single non-NA measurement) or when the metabolite has zero
variance.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.