as_int_period(x, ...)

# S3 method for default
as_int_period(x, n = 1L, origin = 0L, ...)

Arguments

x

An object to convert.

...

Not currently used.

n

An integer indicating the (fixed) number of days used for grouping; defaults to 1.

origin

Day on which the grouping begins (default 0).

Value

A grates_int_period object.

Note

Internally grates_int_period objects are stored as the number of days to the earliest day in the specified grouping.

Examples

as_int_period(0:10, n = 2)
#> <grates_int_period[11]> #> [1] 0 to 1 0 to 1 2 to 3 2 to 3 4 to 5 4 to 5 6 to 7 6 to 7 #> [9] 8 to 9 8 to 9 10 to 11