spathialBoundaryIds {spathial} | R Documentation |
Select starting and ending points
Description
Get the coordinates of the starting and ending points
Usage
spathialBoundaryIds(X, X_labels = NULL, mode = 1, from = NULL, to = NULL)
Arguments
X |
data points |
X_labels |
labels of the data points |
mode |
strategy for boundary selection
|
from |
starting class or row name of the starting point |
to |
ending class or row name of the ending point |
Value
A list of objects
boundary ids: the indexes of the boundaries
X: the new data matrix with the boundary
X_labels: the new labels of the data matrix with the boundary labels
Examples
# 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)
[Package spathial version 0.1.2 Index]