get_dates | R Documentation |
Retrieve dates from an incidence object
get_dates(x, ...)
## Default S3 method:
get_dates(x, ...)
## S3 method for class 'incidence'
get_dates(x, position = "left", count_days = FALSE, ...)
x |
an incidence object |
... |
Unused |
position |
One of "left", "center", "middle", or "right" specifying what side of the bin the date should be drawn from. |
count_days |
If |
a vector of dates or numerics
set.seed(999)
dat <- as.Date(Sys.Date()) + sample(-3:50, 100, replace = TRUE)
x <- incidence(dat, interval = "month")
get_dates(x)
get_dates(x, position = "middle")
set.seed(999)
dat <- as.Date(Sys.Date()) + sample(-3:50, 100, replace = TRUE)
x <- incidence(dat, interval = "month")
get_dates(x)
get_dates(x, "center")
get_dates(x, "right")
# Return dates by number of days from the first date
get_dates(x, count_days = TRUE)
get_dates(incidence(-5:5), count_days = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.