Identifies 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)

Arguments

data

data.frame expected. All catches or samples during the time range selected.

Value

The function returns one data.frame.

Details

The input dataframes must contain all these columns for the function to work :

  • catch_id

  • speciesfate_code

Or

  • samplemeasure_id

  • speciesfate_code

Note

Version 1.0

Author

Chloé Tellier, Esther Mollier, Philippe S. Sabarros

Examples

#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