Creates a schedule of events occurring in the year(s) specified.
in_year(...) in_isoyear(...) in_epiyear(...)
... | A numeric vector of years. |
---|
A schedule object.
The type of year is determined by the function used. These year types are
built atop their definitions in the lubridate
package, where year()
is the commonly understood definition of
a year. The other definitions from the lubridate
package are quoted here:
isoyear()
returns years according to the ISO 8601 week calendar.
epiyear()
returns years according to the epidemilogical week calendars.
my_dates <- seq(from = as.Date("2000-01-01"), to = as.Date("2005-01-01"), by = "1 year") happen(in_year(2000), my_dates)#> [1] TRUE FALSE FALSE FALSE FALSE FALSE#> [1] TRUE FALSE TRUE FALSE FALSE FALSE#> [1] TRUE TRUE TRUE FALSE FALSE FALSE#> [1] TRUE TRUE TRUE FALSE FALSE TRUE#> [1] FALSE FALSE FALSE FALSE TRUE TRUE#> [1] "2000-01-01" "2000-01-02" "2000-01-03" "2000-01-04" "2000-01-05" #> [6] "2000-01-06"