check_length {RoMEBS}R Documentation

Check of length classes in TC

Description

The function checks the consistency of length classes in TC.

Usage

check_length(DataTC,DataSpecies=NA,wd,suffix)

Arguments

DataTC

Biological data table according to MEDITS protocol (TC)

DataSpecies

Information related to target species

wd

working directory path defined by the user

suffix

Suffix string of the Logfile

Details

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.

Value

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.

Author(s)

I. Bitetto, W. Zupa

References

Anonymus. 2017. MEDITS-Handbook. Version n. 9. MEDITS Working Group. 106 pp. http://www.sibm.it/MEDITS 2011/principaledownload.htm

Examples

library(MEDITS)
library(RoMEBS)
wd=tempdir()
DataTC <- RoMEBS::TC[1:20,]
DataSpecies=NA
suffix= "2020-03-05_time_h17m44s55"
check_length(DataTC,DataSpecies,wd,suffix)

[Package RoMEBS version 0.3.0 Index]