check_timestep_by_group: Check timestep by group

check_timestep_by_groupR Documentation

Check timestep by group


This function verifies if the difference in dates within each group in the provided observations corresponds to the provided timestep. This check is performed for the specified date_var and for each group in obs.


check_timestep_by_group(obs, date_var, timestep = "day", exact = TRUE)



Any of the types supported by


The variable in obs representing dates.


The timestep to used. This can be a string ("day", "week", "month") or a numeric whole number representing the number of days.


Logical, if ⁠TRUE``, checks if all differences exactly match the timestep. If ⁠FALSE“, checks if the sum of the differences modulo the timestep equals zero. Default is TRUE.


This function is used for its side effect of checking the timestep by group in obs. If the check passes for all groups, the function returns invisibly. Otherwise, it stops and returns an error message.

See Also

Functions used for checking inputs check_calendar_timestep(), check_group(), check_group_date_unique(), check_max_delay(), check_module(), check_modules_compatible(), check_numeric_timestep(), check_observation_indicator(), check_quantiles(), check_timestep(), check_timestep_by_date()

seabbs/epinowcast documentation built on July 22, 2024, 8:54 p.m.