deg2num | 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.
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"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.