View source: R/unitconversion.degree.to.degree.minute.second.R
unitconversion.degree.to.degree.minute.second | R Documentation |
Performs a conversion of angle measures from degrees to degrees, minutes, and seconds. Minutes (also called minutes of arc) are 1/60th of a degree. Seconds (also called seconds of arc) are 1/60th of a minute or 1/3600 of a degree. Any remaining decimal will be included in the seconds portion of the resulting data structure.
unitconversion.degree.to.degree.minute.second(x = 1)
x |
Vector - Values in units of degrees |
if x is length 1, then a single list, otherwise a nested list for each value of x, names for degrees, minutes, seconds. Sign of resulting values matches sign of input.
## Example 1 - positive and negative (3,3',5'')
#unitconversion.degree.to.degree.minute.second(
# c(
# -(3+(3/60)+(5/3600)),
# 3+(3/60)+(5/3600)
# )
#)
## Example 2 - convert multiple values to a data frame
#as.data.frame(
# do.call(
# rbind,
# unitconversion.degree.to.degree.minute.second(
# c(
# -(3+(3/60)+(5/3600)),
# 3+(3/60)+(5/3600)
# )
# )
# )
#)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.