wqmonthtable: Process Downloaded Water Quality Data

View source: R/wqmonthtable.R

wqmonthtableR Documentation

Process Downloaded Water Quality Data

Description

This function extracts selected parameters for selected months from the MNPCA water quality data. If multiple months are selected, the function will average each parameter across the selected months.

Usage

wqmonthtable(wqdata, parameters, months, startyear = NULL, endyear = NULL)

Arguments

wqdata

a water quality data.frame downloaded using the wqdatadownload() function.

parameters

a character vector of the parameters to be extracted from the data.

months

a numeric vector of the months to be extracted from the data.

startyear

a numeric of the earliest year under consideration in the YYYY format. Default is NULL.

endyear

a numeric of the latest year under consideration in the YYYY format. Default is NULL.

Value

A data.frame

See Also

Other Water Quality: wqdatadownload(), wqmonthtrendplots(), wqmonthtrendstats(), wqparameters(), wqstations()

Examples

#Download the data
x <- wqdatadownload(c("15-0010-00-100","15-0010-00-101","15-0010-00-102"))

#Process a single parameter for a single month
y <- wqmonthtable(
       wqdata = x,
       parameters = "Depth, Secchi disk depth",
       months = 6
     )

#Process multiple parameters across multiple months within a given year range
y <- wqmonthtable(
       wqdata = x,
       parameters = c("Depth, Secchi disk depth","Temperature, water","pH"),
       months = c(7,8,9),
       startyear = 2008,
       endyear = 2018
     )

 #Process all parameters above a specific sample size across a specified time period
 y <- wqmonthtable(
        wqdata = x,
        parameters = wqparameters(x,minsample = 5),
        months = c(6,7,8,9),
        startyear = 2008
     )

mnsentinellakes/mnsentinellakes documentation built on May 4, 2024, 7:48 p.m.