hms2rad {astroFns} | R Documentation |
Hours, minutes, and seconds to radians
Description
Angular conversion from hours, minutes, and seconds to radians.
Usage
hms2rad(h = '12h 3m 45.6s')
Arguments
h |
String hours, minutes, and seconds |
Details
Function reads a string (the input is a string to allow conversion of angles between -1 and zero hours) with hours, minutes, and seconds separated by any of characters d, m, s, a colon, or a comma. Spaces are not valid separators, as they are removed as part of input parsing. Zeros are the default if values for minutes or seconds are missing from the string. A minus sign before the hours indicates negative hours. Decimal values are allowed in any position.
Value
Angle in radians.
Author(s)
Andrew Harris
See Also
Examples
hms2rad('10, 22, 14')
hms2rad('-0:30')
hms2rad('0h30')
[Package astroFns version 4.2-1 Index]