spathialWay {spathial} | R Documentation |
Compute Principal Path
Description
Get the coordinates of the waypoints of the principal path
Usage
spathialWay(X, boundary_ids, NC = 50)
Arguments
X |
data points |
boundary_ids |
starting and ending points |
NC |
number of waypoints |
Value
spathial_res: spathial waypoints
Examples
#EXAMPLE 1
# Load data matrix X
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)
spathial_res
[Package spathial version 0.1.2 Index]