check_rubincode {RoME}R Documentation

Function checking the correctness of species MEDITS code and faunistic category according to TM reference list

Description

The TM list contained in the INSTRUCTION MANUAL VERSION 9 MEDITS 2017 is taken as reference to check the correctness of species code and category.The function is applied to catch data table (TB), Biological data table (TC) and Individual data table (TE).

Usage

check_rubincode(ResultData,year,TM_list,wd,suffix)

Arguments

ResultData

alternatively: Catch data table (TB), Biological data table (TC) and Individual data table (TE).

year

reference year for the analysis

TM_list

TM_list reference list

wd

Working directory selected by the user.

suffix

Suffix string of the Logfile.

Details

The checks execution is stopped if any mismatching record was found.

Value

The function returns always TRUE if used to check TB tables, indicating in the logfile the species codes not present in TM list. If unexpected rubin codes are detected in both TC and TE tables an error (FALSE value) is reported in the logfile, interrumpting the function running.

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


wd=tempdir()
suffix= "2020-03-05_time_h17m44s55"
year=2007

# example using TB table
TB <- RoME::TB
check_rubincode(TB,year,TM_list,wd,suffix)

# example using TC table
TC <- RoME::TC
check_rubincode(TC,year,TM_list,wd,suffix)

[Package RoME version 0.1.23 Index]