Learn R Programming

astroFns (version 4.2-1)

rad2dms: Convert radians to degrees, minutes, and seconds

Description

Angular conversion from radians to degrees, minutes, and seconds

Usage

rad2dms(rad = 1, places = 2)

Arguments

rad

Decimal radians

places

Number of decimal places in seconds term (0:6)

Value

Fixed-format string with sign, then degrees, minutes, and seconds separated by colons.

Details

Convert radians to degrees, minutes, and seconds.

See Also

rad2hms, dms2rad, hms2rad

Examples

Run this code
# NOT RUN {
rad2dms(2.44)
rad2dms(dms2rad(c('-1,4,5.12', '10:04: 5.3')), places=3)
rad2dms(-66.5 * pi/180) # from degrees to dms
# }

Run the code above in your browser using DataLab