coordToISO: From coordinate in decimal degree format to International...

Description Usage Arguments Details Value Note Author(s) References See Also

View source: R/coordToISO.R

Description

Give a coordinate in decimal degree format to assign the corresponding International Organization for Standardization (ISO 3166-1 alpha-2/alpha-3) [1].

Usage

1
coordToISO(coordinates.tab = NULL, iso = 2)

Arguments

coordinates.tab

Data Frame class. A data frame with at least two columns called decimalLatitude and 'decimalLongitude'.

iso

numeric (2 or 3). To define the code whether ISO-2 (iso=2, default value) or ISO-3 (iso=3).

Details

If the coordinate is outside the continent, this can not be assigned and will be assigned as NaN. If you want to see the oficial ISO codes, you could use the data(ISO2) or data(ISO3) comands.

Value

A table with three columns (decimalLatitude, decimalLongitude, countryCode)

Note

See: R-Alarcon V. and Miranda-Esquivel DR.(submitted) geocleaMT: An R package to cleaning geographical data from electronic biodatabases.

Author(s)

R-Alarcon Viviana and Miranda-Esquivel Daniel R.

References

[1]ISO 2015. International standard for country codes and codes for their subdivisions. Country codes - iso 3166. International Organization for Standardization. Available online at http://www.iso.org/iso/country_codes

See Also

coordToCountry


Dmirandae/geocleaMT-1 documentation built on Nov. 18, 2019, 6:26 p.m.