check_nb_per_sexTC {RoMEBS} | R Documentation |
The function checks the consistency of the number of individuals by sex measured (NO_OF_INDIVIDUAL_OF_THE_ABOVE_SEX_MEASURED field in the biological data table, TC) with the sum of the individuals by sex, length class and maturity stage (NUMBER_OF_INDIVIDUALS_IN_THE_LENGTH_CLASS_AND_MATURITY_STAGE field in TC)
check_nb_per_sexTC(DataTC, wd, suffix)
DataTC |
Biological data table according to MEDITS protocol (TC) |
wd |
working directory path defined by the user |
suffix |
Suffix string of the Logfile |
The function checks the consistency of the number of individuals by sex measured (NO_OF_INDIVIDUAL_OF_THE_ABOVE_SEX_MEASURED field in the biological data table, TC) with the sum of the individuals by sex, length class and maturity stage (NUMBER_OF_INDIVIDUALS_IN_THE_LENGTH_CLASS_AND_MATURITY_STAGE field in TC)
The function returns TRUE if no error occurs, while FALSE is returned when there inconsistences between the following biological data table (TC): NO_OF_INDIVIDUAL_OF_THE_ABOVE_SEX_MEASURED and NUMBER_OF_INDIVIDUALS_IN_THE_LENGTH_CLASS_AND_MATURITY_STAGE.If the field number per sex is found completely empty, the routine will stop and will produce automatically a .csv file (TC_file_with_computed_nb_per_sex.csv) with the nb per sex column filled in. The user will have to copy and paste the column in the original file and run again the code.
I. Bitetto, W. Zupa
Anonymus. 2017. MEDITS-Handbook. Version n. 9. MEDITS Working Group. 106 pp.https://www.sibm.it/MEDITS 2011/principaledownload.htm
library(RoMEBS) wd <- tempdir() suffix="2020-03-05_time_h17m44s55" DataTC = MEDITS::TC check_nb_per_sexTC(DataTC,wd,suffix)