geo2sph | R Documentation |
Convert latitude (lat) and longitude (lon) to spherical coordinates (theta, phi) with theta in [0,pi] and phi in [0,2*pi). All values lat, lon, theta, phi are assumed to be in radians.
geo2sph(...)
... |
A data.frame with columns lat and lon, or named vectors of lat and lon. |
A data.frame with columns theta and phi.
geo <- data.frame( lat = c(0, pi/3, pi/2), lon = c(0, pi/3, pi)) geo sph <- geo2sph(geo) sph
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.