Description Usage Arguments Examples
Get the 2D coordinates of each waypoint (using t-SNE algorithm for the dimensionality reduction)
1 2 3 4 5 6 7 8 9 10 |
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() |
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.