Description Usage Arguments Details Value Author(s)
View source: R/tidy_PCA_biplot.R
PCA on tidy (long-format) data. With this data you don't need to create a matrix to calculate PCA. Your data needs to be in long format with columns identifying the samples and the variables.
1 2 |
data |
Numerical matrix with (or an object coercible to such) with samples in rows and variables as columns. Can also be a data frame in which case all numberic variables are used to fit the PCA. |
sample_col |
Bare column name for the column defining the samples |
var_col |
Bare column name for the column defining the variables |
value_col |
Bare column name for the column defining the values |
pc_max |
A scalar giving the number of principal components to calculate. |
scale |
Scaling, see |
method |
One of the methods reported by
|
This function is wrapper function for pca
.
the following set of pca methods are available:
Uses classical prcomp
. See documentation for
svdPca
.
An iterative method capable of handling small amounts of
missing values. See documentation for nipalsPca
.
Same as nipals but implemented in R.
An iterative method using a Bayesian model to handle missing
values. See documentation for bpca
.
An iterative method using a probabilistic model to handle
missing values. See documentation for ppca
.
Uses expectation maximation to perform SVD PCA on
incomplete data. See documentation for
svdImpute
.
Scaling and centering is part of the PCA model and handled by
prep
.
The original data.frame in addition to scores and loadings columns.
Jan Stanstrup, [email protected].
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.