parse_parts: parse coordinates into degrees, minutes and seconds

Description Usage Arguments Value Examples

Description

parse coordinates into degrees, minutes and seconds

Usage

1
2
3

Arguments

str

(character) string including longitude or latitude

Value

data.frame with columns for:

NA/NaN given upon error

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
parse_parts_lon("140.4183318")
## Not run: 
parse_parts_lon("174.6411133")
parse_parts_lon("-45.98739874")
parse_parts_lon("40.123W")

parse_parts_lat("45N54.2356")
parse_parts_lat("40.4183318")
parse_parts_lat("-74.6411133")
parse_parts_lat("-45.98739874")
parse_parts_lat("40.123N")
parse_parts_lat("N40°25’5.994")

# not working, needs format input
parse_parts_lat("N455698735")

# multiple
x <- c("40.123°", "40.123N74.123W", "191.89", 12, "N45 04.25764")
parse_parts_lat(x)
system.time(parse_parts_lat(rep(x, 10^2)))

## End(Not run)

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