This function aims to find all the samples in the observer data that don't have a fate.

obs_sample_no_fate_control(sample)

Arguments

sample

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

Value

The function returns one data.frame.

Details

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

  • samplemeasure_id

  • speciesfate_code

Note

Version 1.0

Author

Chloé Tellier, Esther Mollier, Philippe S. Sabarros

Examples

#Sample 1 is ok: the fate code is 6 (retained on board)
#Sample 2 is ok: the fate code is 4 (discarded alive)
#Sample 3 is not ok: the fate code is NA
sample <- data.frame(samplemeasure_id = c("1", "2", "3"),
                     speciesfate_code = c("6", "4", NA))
obs_sample_no_fate_control(sample)
#>   samplemeasure_id speciesfate_code logical
#> 1                1                6    TRUE
#> 2                2                4    TRUE
#> 3                3             <NA>   FALSE