parse_lon_lat: parse longitude and latitude

Description Usage Arguments Details Value Examples

View source: R/parse_lat_lon.R

Description

parse longitude and latitude

Usage

1
parse_lon_lat(lon, lat)

Arguments

lon

(character/numeric/integer) one or more longitude values

lat

(character/numeric/integer) one or more latitude values

Details

length(lon) == length(lat)

Value

data.frame, with columns lon, lat. on an invalid values, an NA is returned. In addition, warnings are thrown on invalid values

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
parse_lon_lat(-120.43, 49.12)
## Not run: 
parse_lon_lat(-120.43, 93)
parse_lon_lat(-190, 49.12)
parse_lon_lat(240, 49.12)
parse_lon_lat(-190, 92)
# many
lons <- c("45W54.2356", "181", 45, 45.234234, "-45.98739874")
lats <- c("40.123°", "40.123N74.123W", "191.89", 12, "N45 04.25764")
parse_lon_lat(lons, lats)

## End(Not run)

parzer documentation built on Dec. 20, 2021, 5:08 p.m.