This function validates the n_fishers
column in the provided dataset using the alert_outlier
function to detect outliers. If an outlier is detected, an alert is triggered and the n_fishers
value is set to NA.
Usage
validate_nfishers(data = NULL, k = NULL)
Arguments
- data
A data frame containing the n_fishers
column.
- k
A numeric value used in the LocScaleB function for outlier detection.
Value
A data frame with three columns:
survey_id
: The unique identifier for each survey
n_fishers
: The original number of fishers if valid, otherwise NA
alert_n_fishers
: A numeric value (2) indicating an outlier, or NA if the value is valid