Description Usage Arguments Details Value See Also Examples
A wrapper around dplyr::mutate()
that creates a correction factor for each observation.
1 2 |
.data |
A tbl |
corrFactor |
New variable name for correction factor data |
dateVar |
Name of variable containing date data |
timeVar |
Name of variable containing time data |
tz |
String name of timezone, defaults to system's timezone |
format |
Either "MDY" or "YMD" for |
keepDateTime |
A logical statement to keep an intermediate dateTime variable |
Correction factors are calculated 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.
An object of the same class as .data
with the new correction factor variable added
to the other data in .data
as well as a dateTime variable if keepDateTime = TRUE.
dr_correctOne
for correction factor creation,
dr_correctTwo
for the two-point drift correction
1 2 3 4 5 6 7 8 9 | testData <- data.frame(
Date = c("9/18/2015", "9/18/2015", "9/18/2015", "9/18/2015", "9/18/2015", "9/18/2015"),
Time = c("12:10:49", "12:15:50", "12:20:51", "12:25:51", "12:30:51", "12:35:51"),
Temp = c(14.76, 14.64, 14.57, 14.51, 14.50, 14.63),
SpCond = c(0.754, 0.750, 0.750, 0.749, 0.749, 0.749),
stringsAsFactors = FALSE
)
dr_factor(testData, corrFactor = corrFac, dateVar = Date, timeVar = Time, keepDateTime = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.