Description Usage Arguments Details Examples
The values are stored as a difftime vector with a custom class, and always with "seconds" as unit for robust coercion to numeric. Supports construction from time values, coercion to and from various data types, and formatting. Can be used as a regular column in a data frame.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | hms(seconds = NULL, minutes = NULL, hours = NULL, days = NULL)
is.hms(x)
as.hms(x, ...)
## Default S3 method:
as.hms(x, ...)
## S3 method for class 'difftime'
as.hms(x, ...)
## S3 method for class 'numeric'
as.hms(x, ...)
## S3 method for class 'character'
as.hms(x, ...)
## S3 method for class 'POSIXt'
as.hms(x, tz = pkgconfig::get_config("hms::default_tz", ""),
...)
## S3 method for class 'POSIXlt'
as.hms(x, tz = pkgconfig::get_config("hms::default_tz", ""),
...)
## S3 method for class 'hms'
as.POSIXct(x, ...)
## S3 method for class 'hms'
as.POSIXlt(x, ...)
## S3 method for class 'hms'
as.character(x, ...)
## S3 method for class 'hms'
as.data.frame(x, row.names = NULL, optional = FALSE, ...,
nm = paste(deparse(substitute(x), width.cutoff = 500L), collapse = " "))
## S3 method for class 'hms'
format(x, ...)
## S3 method for class 'hms'
print(x, ...)
|
seconds, minutes, hours, days |
Time since midnight. No bounds checking is performed. |
x |
An object. |
... |
Arguments passed on to further methods. |
tz |
The time zone in which to interpret a POSIXt time for extracting
the time of day. The default is now the zone of |
row.names |
|
optional |
logical. If |
nm |
Name of column in new data frame |
For hms
, all arguments must have the same length or be
NULL
. Odd combinations (e.g., passing only seconds
and
hours
but not minutes
) are rejected.
1 2 3 4 5 6 7 8 9 10 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.