dim_reduction: Perform dimensionality reduction

Description Usage Arguments Value

View source: R/flowR.R

Description

Perform dimensionality reduction

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
dim_reduction(
  df,
  yvar,
  Ncells = NULL,
  transformation = NULL,
  y_trans = identity_trans(),
  perplexity = 50,
  dims = 2,
  method = "tSNE",
  check_duplicates = FALSE
)

Arguments

df

a data.frame with only numeric variables.

yvar

names of df's variables used to perform dimensionality reduction

Ncells

Maximum number of cells without any NA values sampled from df. If NULL, all cells without any NA values are used

transformation

Named list of trans objects. List names should correspond to variable names.

y_trans

default trans object to be used if transformation is NULL.

perplexity

t-SNE perplexity parameter (passed to Rtsne:Rstne())

dims

Number of dimensions (passed to Rtsne:Rstne())

method

Name of the method used. Either "tSNE" or "umap"

check_duplicates

logical. Checks whether duplicates are present (passed to Rtsne:Rstne())

Value

a data.frame with additionnal columns : "tSNE1" and "tSNE2" for method 'tSNE', "UMAP1" and "UMAP2" for method 'umap'


VoisinneG/flowR documentation built on June 1, 2021, 6:42 p.m.