removePrincipalComponents {WGCNA} | R Documentation |
Remove leading principal components from data
Description
This function calculates a fixed number of the first principal components of the given data and returns the residuals of a linear regression of each column on the principal components.
Usage
removePrincipalComponents(x, n)
Arguments
x |
Input data, a numeric matrix. All entries must be non-missing and finite. |
n |
Number of principal components to remove. This must be smaller than the smaller of the number of rows and
columns in |
Value
A matrix of residuals of the same dimensions as x
.
Author(s)
Peter Langfelder
See Also
svd
for singular value decomposition,
lm
for linear regression
[Package WGCNA version 1.72-5 Index]