driftR | R Documentation |
There are many sources of water quality data including instruments
(ex: YSI instruments) and open source data sets (ex: USGS and NDBC), all of
which are susceptible to errors/inaccuracies due to drift. driftR
provides
a grammar for cleaning and correcting these data in a "tidy", reproducible
manner.
The driftR
package implements a series of equations used in
Dr. Elizabeth Hasenmueller's
hydrology and geochemistry research. These equations correct continuous water quality
monitoring data for incremental drift that occurs over time. There are two
forms of corrections included in the package - a one-point calibration and
a two-point calibration. One-point and two-point calibration values are suited
for different types of measurements. The package is currently written for the
easiest use with YSI Sonde products.
There are four key verbs that are introduced in driftR
:
read: The dr_readSonde
function imports and properly
formats output from YSI Sonde instrument
factor: The dr_factor
function calculates factors
based on the time of the observation and the total amount of time that the
instrument had been deployed. They are used in the equations for both the
one-point and two-point drift corrections.
correct: The dr_correctOne
and dr_correctTwo
functions take both the factors and standard values as parameters for calculating
drift corrected versions of specific measurements.
drop: The dr_drop
function allows for removing erroneous
observations from both the head and the tail of the data.
driftR
makes use of tidy evaluation and the pronoun .data
, meaning
that variable references may be either quoted or unquoted (i.e. bare). This also
means that driftR
works seamlessly with magrittr
pipe operators.
Maintainer: Andrew Shaughnessy andrew.shaughnessy@slu.edu
Authors:
Christopher Prener, Ph.D. chris.prener@slu.edu
Elizabeth Hasenmueller, Ph.D. elizabeth.hasenmueller@slu.edu
Useful links:
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.