readMWRcens: Read censored data from an external file

View source: R/readMWRcens.R

readMWRcensR Documentation

Read censored data from an external file

Description

Read censored data from an external file

Usage

readMWRcens(censpth, runchk = TRUE, warn = TRUE)

Arguments

censpth

character string of path to the censored file

runchk

logical to run data checks with checkMWRcens

warn

logical to return warnings to the console (default)

Details

Data are imported with read_excel, checked with checkMWRcens, and formatted with formMWRcens. The input file includes rows for each parameter and two columns indicating the parameter name and number of missed or censored records for that parameter. The data are used to complete the number of missed and censored records column for the completeness table created with tabMWRcom and is an optional input. The parameters in this file must match those in the data quality objectives file for frequency and completeness.

Value

A formatted censored data frame that can be used for downstream analysis

Examples

censpth <- system.file('extdata/ExampleCensored.xlsx', package = 'MassWateR')

censdat <- readMWRcens(censpth)
head(censdat)

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