formMWRacc: Format data quality objective accuracy data

View source: R/formMWRacc.R

formMWRaccR Documentation

Format data quality objective accuracy data

Description

Format data quality objective accuracy data

Usage

formMWRacc(accdat)

Arguments

accdat

input data fram

Details

This function is used internally within readMWRacc to format the input data for downstream analysis. The formatting includes:

  • Minor formatting for units: For conformance to WQX, e.g., ppt is changed to ppth, s.u. is changed to NA in uom

  • Convert Parameter: All parameters are converted to Simple Parameter in paramsMWR as needed

  • Remove unicode: Remove or replace unicode characters with those that can be used in logical expressions in qcMWRacc, e.g., replace \geq with >=

  • Convert limits to numeric: Convert MDL and UQL columns to numeric

Value

A formatted data frame of the data quality objectives file for accuracy

Examples

accpth <- system.file('extdata/ExampleDQOAccuracy.xlsx', package = 'MassWateR')

accdat <- readxl::read_excel(accpth, na = c('NA', ''))
accdat <- dplyr::mutate(accdat, dplyr::across(-c(`Value Range`), ~ dplyr::na_if(.x, 'na')))

formMWRacc(accdat)

massbays-tech/MassWateR documentation built on April 12, 2025, 7:53 p.m.