chemdata_prep: Prepare raw chemistry data for analysis, per specifications...

View source: R/chemistry.R

chemdata_prepR Documentation

Prepare raw chemistry data for analysis, per specifications in the

Description

This function will not only calculate CSI and LRM, but it will also get the overall integrated SQO Category and Score for the stations that are given to it.

Usage

chemdata_prep(chemdata)

Arguments

chemdata_prep.input

a dataframe with the following columns:

StationID

AnalyteName

Result

RL

MDL

units (optional) - Metals should be in mg/dry kg (mg/kg dw) and all organic constituents should be in ug/dry kg (ug/kg dw).

fieldrep (optional) - data will be filtered to where fieldrep = 1

labrep (optional) - data will be filtered to where labrep = 1

sampletypecode (optional) - data will be filtered to where sampletypecode = Result (to avoid including data from QA/QC samples)

Details

We make the assumption that Non-detects are marked with -88 in the result column. We also assume that all constituents are expressed on a sediment dry-weight basis. Specifically, all metals should be in mg/dry kg and all organic constituents should be in ug/dry kg.

Examples

data(chem_sampledata) # load sample data to your environment
chemdata_prep(chem_sampledata) # get scores and see output


SCCWRP/SQOUnified documentation built on Nov. 3, 2024, 12:54 a.m.