plotInteractivePCA: Returns an interactive PCA plot.

Description Usage Arguments Value Examples

View source: R/plotInteractivePCA.R

Description

Returns an interactive PCA plot.

Usage

1
2
3
4
5
6
7
8
9
plotInteractivePCA(
  data,
  meta,
  group,
  model = c("2D", "3D"),
  title = "",
  colors = c(),
  inverse = c(FALSE, FALSE, FALSE)
)

Arguments

data

numerical matrix or data frame, raw, normalized or transformed. Samples must be in rows and variables in columns

meta

data frame containing meta data

group

meta data columns to be represented in the plot

model

plots a "2D" (default) or "3D" version

title

plot's title

colors

character vector of custom colors

inverse

boolean vector to decide which component plot in reverse, the order is PC1, PC2, PC3

Value

plotly object containing plot data

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
Get the result and store it in an object
x <- plotInteractivePCA(combinedData, metaDF, c('Treatment', 'Week'), title="Treatment-week interaction")

direct plot with custom color
plotInteractivePCA(combinedData, metaDF, c('Treatment'), title="Treatment", colors = c("#F8766D", "#00BFC4", "#56B4E9"))

reverse PC1
plotInteractivePCA(combinedData, metaDF, c('Treatment', 'Week'), title="Treatment-week interaction", inverse = c(T,F,F))

3D version
plotInteractivePCA(combinedData, metaDF, c('Treatment', 'Week'), title="Treatment-week interaction", inverse = c(T,F,F), model="3D")

loalon/rBiobox documentation built on Dec. 21, 2021, 11:44 a.m.