Skip to contents

This function verifies if the difference in numeric dates in the provided observations corresponds to the provided timestep.

Usage

check_numeric_timestep(dates, date_var, timestep, exact = TRUE)

Arguments

dates

Vector of Date class representing dates.

date_var

The variable in obs representing dates.

timestep

Numeric timestep for date difference.

exact

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.

Value

This function is used for its side effect of stopping if the check fails. If the check passes, the function returns invisibly.