geoAngle | R Documentation |
Get an angle between two directions defined by arcs on the unit sphere
geoAngle(p1)
p1 |
A |
Let p1[1,], p1[2,], and p1[3,] denote the rows of p1
.
Then the returned object is an angle in radians beween two arcs determined by #'the pairs #'of spherical points (p1[1,], p1[2,]) and (p1[2,], p1[3,])
respectively.
p1 <- data.frame(diag(3)) p1 colnames(p1) <- c("x", "y", "z") geoAngle(p1) geo <- data.frame( lat = c(30, 0, 20), lon = c(30, 60, 10))*(pi/180) geo p2 <- geo2sph(geo) p2 geoAngle(p2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.