View source: R/convertTropicosCoords.r
| convertTropicosCoords | R Documentation |
The TROPICOS (http://www.tropicos.org/) plant specimen database of the Missouri Botanical Garden returns records in degrees-minutes-seconds format with symbols for degrees, minutes, second, and hemisphere. This function converts this format to signed decimal degrees format. By default, values surrounded by square brackets ([]) are returned as NA because they are geolocated to the center of a political unit (usually county or equivalent).
convertTropicosCoords(x = NULL, long = NULL, lat = NULL)
x |
A data frame with data downloaded from TROPICOS. If |
long |
Character list, longitudes in TROPICOS format. If this is supplied then do not supply |
lat |
Character list, latitudes in TROPICOS format. If this is supplied then do not supply |
A data five-column frame. The first two columns are the original TROPICOS coordinates, the next two the converted coordinates, and the last a flag to indicate if the TROPICOS coordinates were approximate (TRUE) or "exact" (FALSE) or missing (NA).
dmsToDecimal
long <- c("078°14'05\"\"W", "091°49'39\"\"W", NA, "[091°53'38\"\"W]")
lat <- c("39°40'41\"\"N", "36°34'14\"\"S", NA, "[36°46'14\"\"N]")
convertTropicosCoords(long=long, lat=lat)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.