Use fast.svd
from corpcor
library to calculate an SVD
of a matrix. The data before the calculation is centered. The D
matrix is transformed to show percent variance explained. The missing or
infinite numbers should be removed or imputed in the matrix prior to the
calculation.
1 | fs(x)
|
The function is a slight modification of the function created by Brig Mecham.
@references mGenomics
@import corpcor
@param x data matrix
@return
a matrix with the corresponding left singular vectors. Column
names of the matrix are the column names of the input data matrix x
.
a matrix with the corresponding right singular vectors. We refer
to them as eigen vectors in the documentation for all other functions. The matrix
has column names in the following format "EigenN", where N is the number of the
corresponding vector. The row names are the same as the column names of the
input data matrix x
.
a vector containing the values for the variance explained by each singular vector
@export
@seealso fast.svd
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.