parsecoords: Parse coordinates into separate fields

Description Usage Arguments Value Note Author(s) See Also Examples

Description

Parse coordinates into separate fields from a character vector using a format string. This is a manual version of dmsparse.

Usage

1
parsecoords(dat, d1, fmtstr)

Arguments

dat

a character vector of coordinates

d1

a summary of the various coordinate formats obtained from uniqueformats

fmtstr

a format string for the different formats present e.g. "dd.mm","dd.mm.ss"

Value

a dataframe containing degrees, minutes, seconds, letters (N,S,E,W) and decimal degrees in separate columns

Note

In most cases dmsparse would be preferable

Author(s)

Mark Robertson

See Also

dmsparse, uniqueformats

Examples

1
2
3
fmtstr<-c("dd mm.m","dd mm ss.ss","dd mm ss") 
uf<-uniqueformats(places$long[1:3])
px<-parsecoords(places$long[1:3],uf,fmtstr) 

Example output



biogeo documentation built on May 1, 2019, 8:05 p.m.