time_diff | R Documentation |
The time difference between 2 date or date-time vectors.
time_diff(x, y, timespan = 1L)
x |
Start date or datetime. |
y |
End date or datetime. |
timespan |
A timespan used to divide the difference. |
A numeric vector recycled to the length of max(length(x), length(y))
.
library(timeplyr)
library(lubridate)
time_diff(today(), today() + days(10), "days")
time_diff(today(), today() + days((0:3) * 7), weeks(1))
time_diff(today(), today() + days(100), timespan("days", 1:100))
time_diff(1, 1 + 0:100, 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.