Audit daily data for total days in year. An audit is performed to inventory and flag missing days in daily data and help determine if further analyses are appropriate.
preproc_audit_data(
data = NULL,
Date,
value,
year_group,
use_specific_years = FALSE,
begin_year = NULL,
end_year = NULL,
days_cutoff = 360,
date_format = "%Y-%m-%d"
)A data.frame with year_group, count (n, excluding NA values)
of days in each year_group, and a complete years 'boolean' flag.
'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' 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.
'numeric' vector when data = NULL, or 'character' string identifying year column
name when data is specified. Values to audit, must be daily data.
'numeric' vector when data = NULL, or 'character' string identifying
grouping column name when data is specified. Year grouping for each daily value in value
parameter. Must be same length as value.
'boolean' value. Flag to clip data to a certain set of years in
year_group. Default is FALSE.
'numeric' value. If use_specific_years = TRUE, beginning year to clip value.
Default is NULL.
'numeric' value. If use_specific_years = TRUE, ending year to clip value.
Default is NULL.
'numeric' value. Designating the number of days required for a year to be
counted as full. Default is 360.
'character' string. Format of Date. Default is "%Y-%m-%d".
Year grouping is commonly water year, climate year, or calendar year.
preproc_fill_daily, preproc_precondition_data
preproc_audit_data(
data = example_preproc, Date = "Date", value = "value", year_group = "WY"
)
Run the code above in your browser using DataLab