- Define agreed upon structure for inputting user defined parameters for defining checks (e.g., acceptable temperature range - a high and a low or the window size and threshold for spike detection).
df_parms <- data.frame(range_checks = c(1, 10),
spike_checks = c(3, 3)
df_parms[["range_checks"]] <- c(1, 10)
df_parms[["spike_checks"]] <- c(3, 3)
- Within a function, use the args
parms = df_name , then within the function the relevant parameters could be accessed like:
lower_bound <- parms[['range_checks']][1]