check_dictionary {RoME} | R Documentation |
The function checks whether the values contained in specific fields are consistent with the allowed values of the dictionaries.
check_dictionary(ResultData, Field, Values, year, wd, suffix)
ResultData |
Haul data table according to MEDITS protocol (TA) |
Field |
Name of the specific field of the selected TX table |
Values |
Vector of the allowed values for the field to be checked |
year |
reference year for the analysis |
wd |
working directory path defined by the user |
suffix |
Suffix string of the Logfile |
The function checks the consistence of the contained in specific fields with the relative allowed values. The check is performed on the hauls data table (TA), the catch data table (TB), the biological data table (TC) and the individual biological data (TE).
The function returns TRUE if no error occurs, while FALSE is returned when there are differences between the field values and the reference dictionaries. In the logfile is reported the list of all the records in which the inconsistency is detected.
I. Bitetto, W. Zupa
Anonymus. 2017. MEDITS-Handbook. Version n. 9. MEDITS Working Group. 106 pp.https://www.sibm.it/MEDITS 2011/principaledownload.htm
wd <- tempdir() suffix="2020-03-05_time_h17m44s55" Field = "COURSE" Values = c("R","N") DataTA = RoME::TA year = 2007 check_dictionary(ResultData = DataTA, Field, Values, year, wd, suffix)