reduceDimensions {veloviz} | R Documentation

## Reduce dimension using Principal Components Analysis via `svds` from `RSpectra`

### Description

Reduce dimension using Principal Components Analysis via `svds` from `RSpectra`

### Usage

    reduceDimensions(
      matnorm,
      center = TRUE,
      scale = TRUE,
      max.ods.genes = 2000,
      nPCs = 50,
      verbose = TRUE,
      plot = FALSE,
      details = FALSE
    )

### Arguments

`matnorm` | matrix on which to perform PCA
`center` | logical to mean center gene expression before PCA, default = TRUE
`scale` | logical to scale gene expression variance before PCA, default = TRUE
`max.ods.genes` | number of most highly expressed overdispersed genes to include, default = 2000
`nPCs` | number of principal components to reduce to return, default = 50
`verbose` | logical for verbosity setting, default = TRUE
`plot` | plot singular values vs number of components
`details` | logical to return pca object, default = FALSE

### Value

matrix of cell scores in nPCs components

### Examples

    data(vel)
    curr <- vel$current

    curr.norm <- normalizeDepth(curr)
    curr.norm <- log10(curr.norm+1)
    reduceDimensions(curr.norm, nPCs=3)

[Package veloviz version 1.0.0 Index]