Description Usage Arguments Details Value See Also
Check whether date series is regular/irregular periodic or not.
1 2 3 4 5 | is_periodic_dates(
dates_series,
freq_rule = c("day", "month", "quarter", "year"),
regular = FALSE
)
|
dates_series |
A vector of dates/timestamps. |
freq_rule |
Frequency rule of period to test, e.g. "day", "month", "quarter", "year", default "Day". |
regular |
Whether to test date series as a regular periodic series or not. Since irregular test is looser than regular test, irregular test on regular series will always return true. Default is FALSE, which means we will use looser test(irregular). |
Periodic dates includes two kinds:
regular periodic series: a date/time vector is regular periodic, if the vector has not more one date/time stamp on each date of period and doesn't miss any date of period. For example, c("2018-01-01", "2018-02-01", "2018-03-01", "2018-04-01", "2018-05-01", "2018-06-01") is a regular monthly periodic dates.
irregular periodic series: a date/time vector is regular periodic, if the vector has more one date/time stamp on each date of period or miss some date of period. For example, c("2018-01-01", "2018-02-01", "2018-04-01", "2018-05-01", "2018-06-01") is is irregular monthly periodic dates, which miss date of "2018-03-01" in dates of months.
return TRUE if dates is periodic, otherwise FALSE.
Other utils_dates:
as_period_date()
,
guess_dates_period()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.