Skip to contents

Use EGRET functions to convert a data.frame of date and discharge columns into "the basic Daily data frame used in WRTDS", i.e., a data.frame with one row per day, parsed datetimes, log(Q), and 7-day and 30-day smoothed Q, keyed on a `Date` column. See populateDaily

Usage

expandFlowForEGRET(flowdat, flow.colname, date.colname, flow.units)

Arguments

flowdat

data frame with discharge values to convert

flow.colname

character string giving the column name that corresponds to flow

date.colname

character string giving the column name that corresponds to dates

flow.units

character string giving the current units of flow in flowdat

Details

The input must be daily (one row per calendar day). Sub-daily input is rejected with an error because EGRET's Daily data.frame is defined as one row per day; see [convertToEGRETSample()] for the sample (observation-level) flow path.

The date column is converted to class `Date` using its own timezone before being passed to [EGRET::populateDaily()], so loadflex (not populateDaily) decides how timestamps map to calendar days.