Learn R Programming

cwhmisc (version 6.0)

hours: convert hours

Description

Functions for conversion of hour representations

Usage

Hd( h, m, s ) Hdms( hd ) Hmsd( hms )

Arguments

h, m, s, hd,hms
Real, representing hours, minutes, seconds, decimal hours, and concatenated h,m,s

Details

Hd Return hours from h, min, sec. Hms Return h, min, sec from hours, is inverse of Hd. Hdms Return hh.mmss from hours. Hmsd Decimal hours from hours.mmss, is inverse of Hdms.

Examples

Run this code
Hd( 12,25,17) # 12.421389
Hms(1.421389) # $h  1, $m 25, $s 17.0004
Hmsd(1.421389) # 1h 42m 13.89 -> 1.703858
Hdms(1.703858) # 1.421389

Run the code above in your browser using DataLab