biplot: Biplot

biplotR Documentation

Biplot

Description

Biplot

Usage

biplot(
  object,
  method = biplot_methods(object)[1],
  by = biplot_by(object, method)[1],
  dims = biplot_dims(object, method, by)[1:2],
  color = if (method %in% DIMREDSUPER) by else "subgroup",
  shape = NULL,
  size = NULL,
  alpha = NULL,
  group = NULL,
  linetype = NULL,
  label = NULL,
  feature_label = "feature_id",
  fixed = list(shape = 15, size = 3),
  nx = 0,
  ny = 0,
  colorpalette = make_svar_palette(object, color),
  alphapalette = make_alpha_palette(object, alpha),
  title = paste0(method, guess_fitsep(fdt(object)), by),
  theme = ggplot2::theme(plot.title = element_text(hjust = 0.5), panel.grid =
    element_blank())
)

Arguments

object

SummarizedExperiment

method

'pca', 'pls', 'lda', 'spls', 'opls', 'sma'

by

svar

dims

numeric vector: e.g. 1:2

color

svar

shape

svar

size

svar

alpha

svar

group

svar

linetype

svar

label

svar

feature_label

fvar

fixed

fixed plot aesthetics

nx

number of x features to plot

ny

number of y features to plot

colorpalette

character vector

alphapalette

character vector

title

string

theme

ggplot2::theme output

Value

ggplot object

Examples

file <- system.file('extdata/atkin.metabolon.xlsx', package = 'autonomics')
object <- read_metabolon(file)
object %<>% pca(ndim = 4)
object %<>% pls(ndim = 4)
biplot(object)
biplot(object, nx = 1)
biplot(object, dims = 3:4, nx = 1)
biplot(object, method = 'pls')
biplot(object, method = 'pls', dims = 3:4)
biplot(object, method = 'pls', dims = 3:4, group = 'Subject')

bhagwataditya/importomics documentation built on Nov. 28, 2024, 8:28 a.m.