Filter a dataset by temporal characteristics
filter-time.Rd
These functions filter a dataset using features of the "date" column, as
defined by mqo_dict()
. Current options include the year, the month of the
year, the day of the week, and the hour of the day. These options allow users
to flexibly filter their data; for example, returning only weekday evenings
in Summer months. All but filter_year()
require short-term data;
filter_year()
will work out whether the data is short- or long-term based
on the data type of the "date" column.
Arguments
- data
An R
data.frame
containing at least five columns; a numeric column of observed values, a numeric column of modelled values, a character or factor column of identifiers that identify the site associated with the concentrations, a character or factor column of identifiers that identify the pollutant being measured/modelled, and a character or factor column containing just"fixed"
or"indicative"
to label each site. See demo_shortterm for an example format.- years, months, wdays, hours
A numeric vector indicating the years (any intger), months of the year (
1
to12
), days of the week (1
to7
, where1
is Sunday), or hours of the day (1
to24
) to retain in the data.- dict
See
mqo_dict()
for more information. Acts as a data dictionary to specify the columns in the data{mqor}
should use.
See also
Other data utilities:
mqo_percentile()
,
mutate_rolling_mean()
,
summarise_daily()
,
validate_mod_obs_pairs()