Learn R Programming

astroFns (version 4.2-1)

rad2hms: Convert radians to hours, minutes, and seconds

Description

Angular conversion from radians to hours, minutes, and seconds

Usage

rad2hms(rad = 1, places = 1)

Arguments

rad

Decimal radians

places

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

Value

Fixed-format string with hours, minutes, and seconds separated by colons.

See Also

rad2dms, dms2rad, hms2rad

Examples

Run this code
# NOT RUN {
rad2hms(2.44)
rad2hms(hms2rad(c('10:04:5.12', '27,04,5.3', '-3:0:0')), places=3)
rad2hms(266.5 * pi/180) # from degrees to hms
# }

Run the code above in your browser using DataLab