poissonPca | R Documentation |
Principal Component Analysis on Poisson data
poissonPca(y, k = 50, transform = NULL, center = FALSE, scale = FALSE)
y |
Sparse matrix (can be a matrix, dgCMatrix, or SparseMatrix) |
k |
Number of principal components to return (Default: 50) |
transform |
CountTransform object or character(1) specifying a
transformation to apply to |
center |
Whether transformed data should be shifted to have mean zero.
Can be specified either as a vector of two logical values, specifying
whether the rows/columns should be centered, respectively, or a single
logical value specifying whether the columns should be centered (for
consistency with |
scale |
Whether transformed rows should be scaled to have unit variance |
List with components:
sdevStandard deviations of principal components
rotationMatrix of variable loadings (i.e., matrix containing the eigenvectors of the covariance/correlation matrix as columns)
xMatrix of rotated data (rotated after applying the transformations specified)
data(tenx_subset)
dim(tenx_subset)
system.time({
pc <- poissonPca(tenx_subset, k = 10, transform = "pearson")
})
plot(pc$x[, 1:2])
barplot(pc$sdev)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.