pcaR2 | R Documentation |
Calculate the fraction of variance explained by a predictor (numerical or factor) for each of the columns in a matrix or for each principal component in a prcomp object.
pcaR2(x, predictor, randomize = 0, comps = NULL, scaled = FALSE)
## S3 method for class 'pcaR2'
plot(x, ...)
x |
a numeric matrix or object of class prcomp |
predictor |
a factor or a numeric vector |
randomize |
how many randomizations should be run |
comps |
for which PCA components (or for which columns of the numeric matrix) the correlations should be calculated |
scaled |
whether the data should be scaled |
Calculate the fraction of variance explained by a predictor (numerical or factor) for each of the columns in a matrix or for each principal component in a prcomp object.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.