View source: R/daytime_arithmetic.R
subtract_daytime | R Documentation |
daytime
objectsPerform subtraction on daytime
objects
subtract_daytime(e1, e2)
e1 |
a POSIX-formatted |
e2 |
a POSIX-formatted |
This is a decidedly internal function that is strictly a wrapper
around difftime
. The magic happens with Ops
dispatch of the
`-`
operator, where the objects are checked and the original
timestamps pulled out.
a difftime
object, in minutes
daytime:::Ops.daytime
base_time <- Sys.time() t1 <- as_daytime(base_time) t2 <- as_daytime(base_time + 86460) t1 - t2 t2 - t1
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.