apply_calibration {STICr}R Documentation

apply_calibration

Description

This function takes the cleaned data frame generated by tidy_hobo_data and the fitted model object generated by get_calibration. It outputs a data frame with the same columns as the input, plus a calibrated specific conductivity column called SpC.

Usage

apply_calibration(stic_data, calibration, outside_std_range_flag = TRUE)

Arguments

stic_data

A data frame with a column named condUncal (units: lux), for example as produced by the function tidy_hobo_data.

calibration

a model object relating condUncal to a standard of some sort, for example as produced by the function get_calibration.

outside_std_range_flag

a logical argument indicating whether the user would like to include an additional column flagging (with the letter "O") instances where the calibrated SpC value is outside the range of standards used to calibrate it.

Value

The same data frame as input, except with a new column called SpC. This will be in the same units as the data used to develop the model calibration.

Examples

calibration <- get_calibration(calibration_standard_data)
calibrated_df <- apply_calibration(tidy_stic_data, calibration, outside_std_range_flag = TRUE)
head(calibrated_df)


[Package STICr version 1.1.1 Index]