Description Usage Arguments Details Value
Counts the number of complete periods between two time points. Period length
must be specified. Timezone of start[1]
is used as timezone.
1 | count_periods(start, end, period, from_zero = FALSE)
|
start |
A vector of dates or datetimes. Lubridate, POSIX, and text ( or length(end). |
end |
A vector of dates or datetimes. Lubridate, POSIX, and text ( or length(start). |
period |
A single lubridate period. |
from_zero |
A single logical value specifying whether to start counting from zero (TRUE) or +1/-1 (FALSE). |
Counting from zero yields the number of complete periods between start
and end
. Counting from +1/-1 yields which period the value of
end
is in.
A numerical vector with a value for each value of start
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.