count_periods: Count periods

Description Usage Arguments Details Value

Description

Counts the number of complete periods between two time points. Period length must be specified. Timezone of start[1] is used as timezone.

Usage

1
count_periods(start, end, period, from_zero = FALSE)

Arguments

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).

Details

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.

Value

A numerical vector with a value for each value of start.


TheFridayInstitute/fimoodler documentation built on May 28, 2019, 9:37 a.m.