preproc_validate_daily {HyMETT}R Documentation

Validates that daily data do not contain gaps

Description

Validates that daily data do not contain gaps

Usage

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".

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.

Value

An error message with missing dates, otherwise nothing.

Examples

preproc_validate_daily(data = example_obs, Date = "Date", value = "streamflow_cfs")


[Package HyMETT version 1.1.2 Index]