Allows user to aggregate their data from SWUDS by user-defined parameters.
aggregate_swuds(s_wuds, filter_by, filter_val = NA, aggregate_by = "Volume_mgd")
| s_wuds | swuds object (data frame from melt function) |
|---|---|
| filter_by | chr, column to filter and aggregate by |
| filter_val | values to filter to |
| aggregate_by | column to aggregate. Defaults to "Volume_mgd" |
s_wuds <- swuds_sample #example data from Ohio test_all_huc <- aggregate_swuds(s_wuds, "FROM_HUC_CD") test_some_huc <- aggregate_swuds(s_wuds, "FROM_HUC_CD", c("041000040104", "050600020105")) test_some_years <- aggregate_swuds(s_wuds, "YEAR", c("1995", "2004")) #test_some_aquifers <- aggregate_swuds(s_wuds, "aquifer", "TBD") test_some_months <- aggregate_swuds(s_wuds, "Month", c("Jan", "Feb")) test_some_state_county <- aggregate_swuds(s_wuds, "state_county", "39033") test_some_seasons <- aggregate_swuds(s_wuds, "season", "Fall")