calcTSI: Calculate TSI values from input data

View source: R/calcTSI.r

calcTSIR Documentation

Calculate TSI values from input data

Description

This function calculates TSI values according to Utah's IR methods from input data containing values for of chlorophyll, total phosphorus, and secchi disk depth. Note that inputs for these parameters must be specified in units of ug/L, mg/L, and meters, respectively.

Usage

calcTSI(
  x,
  in_format = "wide",
  chl_ugL = "Chlorophyll a",
  TP_mgL = "Phosphate-phosphorus",
  SD_m = "Depth, Secchi disk depth",
  value_var = "ResultMeasureValue",
  param_var = "CharacteristicName"
)

Arguments

x

Input dataset

in_format

One of "wide" or "flat" to specify data input format. Note that only wide format inputs are currently supported.

chl_ugL

Name of chlorophyll-a variable in ug/L

TP_mgL

Name of total phosphorus variable in mg/L

SD_m

Name of secchi disk depth variable in m

Examples

data(ul_trophic)
head(ul_trophic)
tsi=calcTSI(ul_trophic,chl_ugL="ChlA",TP_mgL="Phosphate.phosphorus.Total",SD_m="Depth.Secchi.disk.depth")
head(tsi)
plot(TSIchl~ChlA,tsi)

utah-dwq/udwqTools documentation built on July 17, 2024, 10:21 p.m.