dimred_pca {animalcules} | R Documentation

## Dimensionality reduction through PCA

### Description

Dimensionality reduction through PCA

### Usage

    dimred_pca(
      MAE,
      tax_level,
      color,
      shape = NULL,
      pcx = 1,
      pcy = 2,
      pcz = NULL,
      datatype = c("logcpm", "relabu", "counts")
    )

### Arguments

`MAE` | A multi-assay experiment object
`tax_level` | The taxon level used for organisms
`color` | A condition to color data points by e.g. "AGE"
`shape` | A condition to shape data points by e.g. "SEX"
`pcx` | Principal component on the x-axis e.g. 1
`pcy` | Principal component on the y-axis e.g. 2
`pcz` | Principal component on the z-axis e.g. 3
`datatype` | Datatype to use e.g. c("logcpm", "relabu", "counts")

### Value

A list with a plotly object and summary table

### Examples

    data_dir = system.file("extdata/MAE.rds", package = "animalcules")
    toy_data <- readRDS(data_dir)
    result <- dimred_pca(toy_data,
                         tax_level="genus",
                         color="AGE",
                         shape="DISEASE",
                         pcx=1,
                         pcy=2,
                         datatype="logcpm")
    result$plot
    result$table

[Package animalcules version 1.8.1 Index]