Skip to contents

Data is filtered when it is beyond a specified year threshold (e.g. 5 years old). The relative date is based on the newest observation in the data set. Optionally, the maximum flow (Q) record can be retained.

Usage

date_filter(df, years, keep_max = FALSE)

Arguments

df

a data.frame with at least a date and Q field.

years

the number of allowed history

keep_max

Should the largest flow record be kept, even if older then "years"

Value

data.frame

See also