aggregate: aggregate functions

Description Usage Arguments Examples

Description

Allows user to aggregate their data from SWUDS by user-defined parameters.

Usage

1
2
aggregate_swuds(s_wuds, filter_by, filter_val = NA,
  aggregate_by = "Volume_mgd")

Arguments

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"

Examples

1
2
3
4
5
6
7
8
9
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")

USGS-R/wateRuse_swuds documentation built on Dec. 8, 2019, 9:47 a.m.