hmsToSec - Converts a vector of h:m:s to seconds.
Arguments
- x
date-time object for
hmsToMin(), vector of times in h:m:s format forhmsToSec(), or numeric vector of seconds forsecToHms()- digits
number of decimal places for seconds, an integer from 0 to 15, or
NULL. The default uses zero places if all non-missing values have negligible fractional parts, otherwise two. Positive values round fractional seconds with carry into seconds, minutes and hours. For compatibility,digits = 0discards fractions usingfloor().
Value
depending on the function:
hmsToMin()numeric vector of times in minutes
hmsToSec()numeric vector of times in seconds
secToHms()character vector of times in h:m:s format
Missing seconds produce NA_character_; infinite values are rejected.
Hours can exceed 23. Negative times retain the existing floor-based
decomposition (for example, -1 second is -1:59:59).
See also
chron::times()
Other date.time:
addMonths(),
countWorkDays(),
date-time-predicates,
date_functions,
generation(),
zodiac()
