Learn R Programming

spMC (version 0.3.15)

which_lines: Points Classification through Directional Lines

Description

The function classifies points which appertain to a same directional line.

Usage

which_lines(coords, direction, tolerance = pi / 8)

Value

A numerical vector containing the line number for each point.

Arguments

coords

an \(n \times d\) matrix where each row denotes the \(d\)-D coordinates of data locations.

direction

a \(d\)-D numerical vector (or versor) which represents the chosen direction.

tolerance

a numerical value for the tolerance angle (in radians). It's pi/8 by default.

Author

Luca Sartore drwolf85@gmail.com

Details

The algorithm used by this function searches the nearest points to a directional line. The function classifies such pairs of points that have the minimum distance and the same direction of the vector \(\phi\).

This operation is done to order points, so that it's possible to compute mean lengths (mlen) and embedded transition probabilities (embed_MC).

References

Sartore, L. (2010) Geostatistical models for 3-D data. M.Phil. thesis, Ca' Foscari University of Venice.

See Also

embed_MC, mlen, getlen

Examples

Run this code
# \donttest{
data(ACM)

direction <- c(0,0,1)

loc.id <- which_lines(ACM[, 1:3], direction)# }

Run the code above in your browser using DataLab