This is a yearday method for the seq()
generic.
Sequences can only be generated for "year"
precision yearday vectors.
When calling seq()
, exactly two of the following must be specified:
to
by
Either length.out
or along.with
# S3 method for clock_year_day seq(from, to = NULL, by = NULL, length.out = NULL, along.with = NULL, ...)
from 
A


to 
A

by 
The unit to increment the sequence by. If If If If 
length.out 
The length of the resulting sequence. If specified, 
along.with 
A vector who's length determines the length of the resulting sequence. Equivalent to If specified, 
...  These dots are for future extensions and must be empty. 
A sequence with the type of from
.
#> <year_day<year>[11]> #> [1] "2020" "2022" "2024" "2026" "2028" "2030" "2032" "2034" "2036" "2038" #> [11] "2040"#> <year_day<day>[11]> #> [1] "2020366" "2022365" "2024366" "2026365" "2028366" "2030365" #> [7] "2032366" "2034365" "2036366" "2038365" "2040366"# Daily sequences are not allowed. Use a naivetime for this instead. try(seq(year_day(2019, 1), by = 2, length.out = 2))#> Error : `from` must be 'year' precision.#> <year_day<day>[2]> #> [1] "2019001" "2019003"