unitconversion.degree.to.degree.minute.second: Unit Conversion - Angles - Degrees to Degrees, Minutes, and...

View source: R/unitconversion.degree.to.degree.minute.second.R

unitconversion.degree.to.degree.minute.secondR Documentation

Unit Conversion - Angles - Degrees to Degrees, Minutes, and Seconds

Description

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.

Usage

unitconversion.degree.to.degree.minute.second(x = 1)

Arguments

x

Vector - Values in units of degrees

Value

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.

Examples

## 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)
#      )
#    )
#  )
#)

burrm/lolcat documentation built on Sept. 15, 2023, 11:35 a.m.