R/obs_catch_or_sample_fate_unknown_control.R
obs_catch_or_sample_fate_unknown_control.RdIdentifies in the observer data catches or samples where fate code 9 (other) or 11 (discarded unknown) were used.
obs_catch_or_sample_fate_unknown_control(data)data.frame expected. All catches or samples during the time range selected.
The function returns one data.frame.
The input dataframes must contain all these columns for the function to work :
catch_id
speciesfate_code
Or
samplemeasure_id
speciesfate_code
Version 1.0
#Catch 1 is ok: the catch is discarded alive,
#Catch 2 is ok: the catch is retained on board,
#Catch 3 is not ok: the catch has an unknown fate,
#Catch 3 is not ok: the catch is discarded but with an unknown status.
catch <- data.frame(catch_id = c("1", "2", "3", "4"),
speciesfate_code = c("4", "15", "9", "11"))
obs_catch_or_sample_fate_unknown_control(catch)
#> catch_id speciesfate_code logical
#> 1 1 4 TRUE
#> 2 2 15 TRUE
#> 3 3 9 FALSE
#> 4 4 11 FALSE