deg2num {gmt} | R Documentation |
Convert deg:min:sec string to decimal number.
deg2num(x)
x |
string or vector of strings. |
Degrees, minutes and seconds are separated by colons, and each can have a decimal point as well. First character must be a minus sign or number, and last character must be W, E, S, N, or number.
Numeric representation of the degree string(s).
The string format is adopted from Appendix B.1.1 in the GMT manual.
Arni Magnusson arnima@u.washington.edu.
as.numeric
converts strings to numbers when things are
straightforward.
deg2num
is the opposite of num2deg
.
gmt-package
gives an overview of the package.
# The opposite of num2deg() example deg2num(c("12:30:44.5W", "17.5S", "1:00:05", "200:45E"))