validate_stic_data {STICr} | R Documentation |
validate_stic_data.R
Description
This function takes a data frame with field observations of wet/dry status and SpC and generates both a confusion matrix for the wet/dry observations and a scatterplot comparing estimated SpC from the STICs to field-measured values.
Usage
validate_stic_data(
stic_data,
field_observations,
max_time_diff,
join_cols,
get_SpC,
get_QAQC
)
Arguments
stic_data |
classified STIC data frame with the variable names of that produced by classify_wetdry. At a minimum, there must be |
field_observations |
The input data frame of field observations must include a |
max_time_diff |
Maximum allowed time difference (in minutes) between field observation and STIC reading to be counted as a match. |
join_cols |
A named vector of columns that need to be matched between |
get_SpC |
Logical flag whether to get STIC data for SpC ( |
get_QAQC |
Logical flag whether to get the STIC QAQC data ( |
Value
The field_observations
data frame with new columns indicating the closest-in-time STIC wetdry classification (wetdry_STIC
), SpC measurement (SpC_STIC
; only if get_SpC = T
), and time difference between the field observation and STIC reading (timediff_min
).
Examples
stic_validation <-
validate_stic_data(
stic_data = classified_df,
field_observations = field_obs,
max_time_diff = 30,
join_cols = NULL,
get_SpC = TRUE,
get_QAQC = FALSE
)