zip_dates | R Documentation |
zip_dates
zip_dates(dates, by = NULL, format = NULL, check_duplicate = FALSE)
dates |
Date vector |
by |
increment of the sequence, could be one of 'day', 'month' and 'year'. |
format |
character string. |
check_duplicate |
If true, duplicated formated dates by 'format' will be
removed. If by = 'month' or 'year', suggest setting |
library(lubridate)
data("station_HisPos")
d <- station_HisPos[site == 50136, ]
dates <- d[, make_date(year, month, day)]
s1 <- zip_dates(dates)
s2 <- zip_dates(dates, by = "year", check_duplicate = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.