hzar.map.latLong.dms: Convert D-M-S C strings to degrees

Description Usage Arguments Value Author(s) See Also Examples

View source: R/21-latLongPrep.R

Description

Translate a character vector of typical map coordinate(s) to a matrix of numeric values.

Usage

1
hzar.map.latLong.dms(coordinates)

Arguments

coordinates

A character vector, with each string containing one or more latitude / longitude measurements, seperated by the cardinal direction of the measurement (N/S for latitude, E/W for longitude).

Value

A NxM matrix of numeric values, where N is the number of strings in coordinates and M is the greatest number of measurements in a single string. Each row contains the measurements from each string in coordinates, filling one column from left to right for each measurement. The remaining columns (if any) in a row have the value NA.

Author(s)

Graham Derryberry asterion@alum.mit.edu

See Also

hzar.map.dms2deg

Examples

1
2
3
4
5
6
# A single value:
hzar.map.latLong.dms(c("9-52 N"))
# A 1:2 matrix:
hzar.map.latLong.dms(c("9-52 N 82 W"))
# A 2:2 matrix with NA for the upper right corner:
hzar.map.latLong.dms(c("9-52-34 E" ,"9-52 N 82 W"))

hzar documentation built on May 2, 2019, 7 a.m.