set_check_changes: set_check_changes

View source: R/set_check.R

set_check_changesR Documentation

set_check_changes

Description

Calculates the rate of change from provided change in time and change in pin height. Used for flagging and catching potential errors. Replaces the more simple incremental change approach with one that allows for larger gaps in the data. Perhaps also catches more potential issues for readings that occurred more closely together.

Usage

set_check_changes(
  dataSET,
  duration = "1 year",
  mm_change = 20,
  drop_rows = FALSE,
  issues = c("Hole", "hole", "mussel", "Holr", "Shell", "Mussel", "edge of hole",
    "hole next to mussel"),
  ...
)

Arguments

dataSET

SET data as returned by set_get_sets with calculated changes removed (only raw measures remain) to allow for recalculating incremental changes around any QA processes that removed readings from the workflows.

duration

character string of the time interval to use for threshold calculation; "1 year" default. Leverages lubridate capability to parse duration so values such as "1 week" and "10 months" are acceptable.

mm_change

Change in pin height over the duration provided. Values greater than this (within the specified duration) will be given a flag. Note: the reported change in the data is converted to an absolute change to capture both an increase and a decrease in the measured values.

drop_rows

TRUE, drops rows that don't meet the flag criteria. To return the full dataset, with an appended column of flag set to FALSE. Defaults to FALSE to protect unwanted removal.

Value

tibble of SET data that's been trimmed down to show only measures that were made that fell above the the threshold passed in the function call.


afstarke/reSET documentation built on July 16, 2025, 10:16 p.m.