check_length {RoME} | R Documentation |
The function checks the consistency of length classes in TC.
check_length(DataTC,DataSpecies=NA,year,wd,suffix)
DataTC |
Biological data table according to MEDITS protocol (TC) |
DataSpecies |
Information related to target species |
year |
reference year for the analysis |
wd |
working directory path defined by the user |
suffix |
Suffix string of the Logfile |
The function checks whether the length classes by species are included in the range reported in the DataSpecies dataset. When DataSpecies is NA the DataTargetSpecies dataset (included in the package) is used by default.
The function returns TRUE (warning message in logfile) in case of LENGTH_CLASS value out of the allowed range. If the length classes in TC table (biological data table) are not consistent with DataSpecies dataset (or DataTargetSpecies if DataSpecies is NA) a warning message is given in the logfile. Furthermore, the function returns FALSE in case the value in the LENGTH_CLASS field is empty, exiting with an error message.
I. Bitetto, W. Zupa
Anonymus. 2017. MEDITS-Handbook. Version n. 9. MEDITS Working Group. 106 pp. http://www.sibm.it/MEDITS 2011/principaledownload.htm
wd=tempdir() DataTC <- RoME::TC[1:20,] DataSpecies=NA suffix= "2020-03-05_time_h17m44s55" check_length(DataTC,DataSpecies=NA,year=2007,wd,suffix)