check_lot: Fish lot checker (AFB)

Description Usage Arguments Details Value

Description

Check the quality of the lot

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
check_lot(
  id = NULL,
  type = NULL,
  min_size = NULL,
  max_size = NULL,
  nb = NULL,
  ind_measure = NULL,
  ind_id = NULL,
  ind_size = NULL,
  ...
)

Arguments

id

int id of the lot

type

character type of the lot (N, G, S/L, I)

min_size

dbl minimum size of the lot

max_size

dbl maximum size of the lot

nb

int effectif of the lot

ind_measure

data.frame individual measurement of the fish

ind_id

variable name id of the lot in ind_measure

ind_size

variable name for the size in ind_measure

Details

The function check if there are missing datas that can make the lot invalid. The check are specific of each lot type. For lot "G", we check if min or max size are missing, if min >= max size and the number of fish in the lot is superior or equal to 10. For lot "S/L", we check if the number of measured fishes is superior to 20 (standard protocol propose 30 be measured). In lot "I", we check that the number of measured fishes correspond to the number of fish recorded in the lot. For lot "N", we check if the number of measured fish is equal to one.

Value

a list. Each element of the list correspond to a lot of a fishing operation. If there is no problem in the lot, it returns NA. In the opposite case, the function returns a character containing the type of error.


alaindanet/SizeTrophicInteractions documentation built on Dec. 18, 2021, 11:32 p.m.