spathialPlot {spathial} | R Documentation |
2D spathial
Description
Get the 2D coordinates of each waypoint (using t-SNE algorithm for the dimensionality reduction)
Usage
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
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)
[Package spathial version 0.1.2 Index]