Learn R Programming

biogeo (version 1.0)

dmsparse: Parse coordinate strings into separate degree, minute and second fields

Description

Separates (parse) coordinates into separate columns, provided that there are delimiters between the degrees, minutes and seconds e.g. 27 27'E. The can be several different formats and delimiters in the input.

Usage

dmsparse(dat, x = "long", y = "lat", id = "ID")

Arguments

dat
A dataframe containing columns for latitude, longitude and a unique identifier (ID)
x
The name of the longitude column (default long)
y
The name of the latitude column (default lat)
id
A column containing a unique identifier for that row. The name of the field must be "ID".

Value

See Also

dms2dd, getformat, parsecoords, dmsabs

Examples

Run this code
## Not run: 
# head(places)
# p<-dmsparse(places,x='long',y='lat',id='id')## End(Not run)

Run the code above in your browser using DataLab