spathialPlot: 2D spathial

Description Usage Arguments Examples

View source: R/runFunctions.R

Description

Get the 2D coordinates of each waypoint (using t-SNE algorithm for the dimensionality reduction)

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
spathialPlot(
  X,
  X_labels,
  boundary_ids,
  spathial_res,
  perplexity_value = NULL,
  mask = NULL,
  title = NULL,
  ...
)

Arguments

X

data points

X_labels

labels of the data points

boundary_ids

waypoints

spathial_res

principal path from the starting point to the ending point

perplexity_value

the value for TSNE perplexity (default is nrsamples*3/50)

mask

the mask of the sample to preserve (when prefiltering is computed)

title

the title of the plot

...

Parameters which will be inherited by plot()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
load(system.file('extdata','X.rda',package='spathial',mustWork=TRUE))
# Load description vector X_labels
load(system.file('extdata','X_labels.rda',package='spathial',mustWork=TRUE))
# Run spathialBoundary
boundaryRes <- spathialBoundaryIds(X, X_labels, mode=2, from=3, to=6)
X <- boundaryRes$X
X_labels <- boundaryRes$X_labels
boundary_ids <- boundaryRes$boundary_ids
#Set the number of waypoints
NC <- 20
# Run spathialWay
spathial_res <- spathialWay(X, boundary_ids, NC)
#Run spathialPlot with spathial_res
spathialPlot(X, X_labels, boundary_ids, spathial_res, perplexity_value=30)

spathial documentation built on April 14, 2020, 6:41 p.m.