An R package for preprocessing environmental exposure data, with a focus on handling left-censored measurements and standardising for protocol-related variability.
Installation
You can install the development version from GitHub using devtools:
devtools::install_github("mjrolland/preprocess")Quick Start
library(preprocess)
# Impute values below the limit of detection
imputed <- fill_in(var_to_fill = x, lod = lod)
# Standardise exposure values on protocol variables
standardised <- standardise(
data = your_data,
var_to_std = "x",
protocol_vars = c("batch", "storage_time"),
covariates = c("age", "season"),
folder = "model_outputs"
)Core Functions
-
fill_in(): Imputes values below the limit of detection (LOD) using censored regression on order statistics. -
standardise(): Corrects for protocol effects using linear models with variable selection. -
mk_tbl_std(): Summarises protocol variables associated with exposures across models.
Documentation
The package includes detailed articles to guide your use:
Preprocessing Environmental Data
Walkthrough of a typical preprocessing pipeline using simulated data.Preprocessing Methodology
Overview of the theoretical framework and main steps involved.
You can also access the vignette from R:
vignette("preprocess-intro", package = "preprocess")