plotTsne: Plot TSNE

View source: R/mfishMapping.r

plotTsneR Documentation

Plot TSNE

Description

Plot a TSNE of the data, with assigned colors and labels from provided variables. Note that this function is a modification of code from Pabloc (https://www.r-bloggers.com/author/pabloc/) from https://www.r-bloggers.com/playing-with-dimensions-from-clustering-pca-t-sne-to-carl-sagan/

Usage

plotTsne(
  datIn,
  colorGroup = "none",
  labelGroup = "none",
  useScaled = FALSE,
  capValue = Inf,
  perplexity = 10,
  theta = 0.5,
  main = "TSNE plot",
  maxNchar = 1000,
  seed = 10
)

Arguments

datIn

a fishScaleAndMap output list

colorGroup

a character vector (or factor) indicating how to color the Tsne (e.g., cluster call) or a metadata/mappingResults column name (default=NULL)

labelGroup

a character vector (or factor) indicating how to label the Tsne (e.g., cluster call) or a metadata/mappingResults column name (default=NULL)

useScaled

plot the scaled (TRUE) or unscaled (FALSE; default) values

capValue

values above capValue will be capped at capValue (default is none)

perplexity, theta

other parameters for Rtsne

main

title of the plot

maxNchar

what is the maximum number of characters to display in the plot for each entry?

seed

for reproducibility

Value

Only returns if there is an error


AllenInstitute/mfishtools documentation built on July 5, 2023, 4:20 p.m.