Learn R Programming

spherepc (version 0.1.2)

Proj.Hauberg: Projecting the nearest point

Description

This function performs the approximated projection for each data.

Usage

Proj.Hauberg(data, line)

Arguments

data

matrix or data frame consisting of spatial locations with two columns. Each row represents longitude and latitude.

line

longitude and latitude of line as a matrix or data frame with two columns.

Value

matrix consisting of spatial locations with two columns.

Details

This function returns the nearest points in line for each point in the data. The function requires to load the 'geosphere' R package.

References

Hauberg, S. (2016). Principal curves on Riemannian manifolds. IEEE Transactions on Pattern Analysis and Machine Intelligence, 38, 1915-1921.

See Also

SPC.Hauberg

Examples

Run this code
# NOT RUN {
library(geosphere)
Proj.Hauberg(rbind(c(0, 0), c(10, -20)), rbind(c(50, 10), c(40, 20), c(30, 30)))
# }

Run the code above in your browser using DataLab