Description Usage Arguments Value Examples
Calculates the antipodal coordiantes for a given pair of coordinates
1 | dtAntipode(lat, lon)
|
lat |
latitude coordinate |
lon |
longitude coordinate |
a list of length 2, the first element being the latitude coordinates, and the second element being the longitude coordinates
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## Not run:
dt <- data.table(lat = c(-37,-36,-35),
lon = c(143,144,145))
## return just the antipodes
dt[, dtAntipode(lat, lon)]
## return a new columns of antipodes
dt[, c("AntLat", "AntLon") := dtAntipode(lat, lon)]
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.