get_interval: Get the interval for an incidence object.

Description Usage Arguments Value Examples

View source: R/get_interval.R

Description

Get the interval for an incidence object.

Usage

1
2
3
4
get_interval(x, ...)

## S3 method for class 'incidence'
get_interval(x, integer = TRUE, ...)

Arguments

x

an incidence object.

...

Unused

integer

When TRUE (default), the interval will be converted to an integer vector if it is stored as a character in the incidence object.

Value

if integer = TRUE: an integer vector, otherwise: the value stored in x$interval

Examples

1
2
3
4
5
set.seed(999)
dat <- as.Date(Sys.Date()) + sample(-3:50, 100, replace = TRUE)
x <- incidence(dat, interval = "month")
get_interval(x)
get_interval(x, integer = FALSE)

incidence documentation built on Aug. 25, 2018, 1:03 a.m.