preproc_validate_daily function

Validates that daily data do not contain gaps

Validates that daily data do not contain gaps

preproc_validate_daily( data = NULL, Date = "Date", value = "value", date_format = "%Y-%m-%d" )

Arguments

  • data: 'data.frame'. Optional data.frame input, with columns containing Date and value. Column names are specified as strings in the corresponding parameter. Default is NULL.

  • Date: 'Date' or 'character' vector when data = NULL, or 'character' string identifying Date column name when data is specified. Dates associated with each value in value

    parameter.

  • value: 'numeric' vector when data = NULL, or 'character' string identifying year column name when data is specified. Values to precondition and calculate n-day moving averages from. N-day moving averages only calculated for daily data.

  • date_format: 'character' string. Format of Date. Default is "%Y-%m-%d".

Returns

An error message with missing dates, otherwise nothing.

Details

Used to validate there are no gaps in the daily record before computing n-day moving averages in preproc_precondition_data or lag-1 autocorrelation in POR_calc_AR1. If gaps are present, preproc_fill_daily can be used to fill them with NA values.

Examples

preproc_validate_daily(data = example_obs, Date = "Date", value = "streamflow_cfs")
  • Maintainer: Colin Penn
  • License: CC0
  • Last published: 2024-08-28