coercion-time-difference | R Documentation |
Coercion functions for creating difftime
objects from other
existing objects.
as.difftime(tim, ...) ## Default S3 method: as.difftime(tim, format = "%X", units = "auto", ...)
tim |
A vector specifying a time interval. |
... |
Other arguments passed on to methods. |
format |
A single character specifying the format of |
units |
A single character specifying units in which the results are
desired. Required if |
This function overrides the non-generic as.difftime()
function
provided in base so that packages can provide methods for different data
types. The default method call the base version.
A difftime
object with an attribute indicating the units.
as.difftime(1:5, units = "secs") as.difftime(c("01:55:22", "01:55:25")) as.difftime("01", format = "%H") as.difftime("01", format = "%H", units = "secs")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.