This function checks the validity of the landing_date
in the provided dataset.
If the landing_date
is before 1990-01-01, an alert (error label) with the number 1 is triggered.
The landing_date
is then set to NA
for those records.
Usage
validate_dates(data = NULL)
Arguments
- data
A data frame containing the landing_date
column.
Value
A data frame with two columns: landing_date
and alert_date
.
landing_date
: The original date if valid, otherwise NA
.
alert_date
: A numeric value indicating the alert (error label) number, where 1 represents an invalid date.
Examples
if (FALSE) { # \dontrun{
validate_dates(data)
} # }