checkMWRfrecom {MassWateR}R Documentation

Check data quality objective frequency and completeness data

Description

Check data quality objective frequency and completeness data

Usage

checkMWRfrecom(frecomdat, warn = TRUE)

Arguments

frecomdat

input data frame

warn

logical to return warnings to the console (default)

Details

This function is used internally within readMWRfrecom to run several checks on the input data for frequency and completeness and conformance to WQX requirements

The following checks are made:

Value

frecomdat is returned as is if no errors are found, otherwise an informative error message is returned prompting the user to make the required correction to the raw data before proceeding.

Examples

library(dplyr)

frecompth <- system.file('extdata/ExampleDQOFrequencyCompleteness.xlsx', 
     package = 'MassWateR')

frecomdat <- suppressMessages(readxl::read_excel(frecompth, 
      skip = 1, na = c('NA', 'na', ''), 
      col_types = c('text', 'numeric', 'numeric', 'numeric', 'numeric', 'numeric', 'numeric')
    )) %>% 
    rename(`% Completeness` = `...7`)
    
checkMWRfrecom(frecomdat)

[Package MassWateR version 2.1.4 Index]