check_dictionary {RoMEBS}R Documentation

Check of the dictionary of specific fields

Description

The function checks whether the values contained in specific fields are consistent with the allowed values of the dictionaries.

Usage

check_dictionary(ResultData, Field, Values, wd, suffix)

Arguments

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

wd

working directory path defined by the user

suffix

Suffix string of the Logfile

Details

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).

Value

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.

Author(s)

I. Bitetto, W. Zupa

References

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

Examples

    wd <- tempdir()
    suffix="2020-03-05_time_h17m44s55"
    Field = "COURSE"
    Values = c("R","N")
    DataTA = MEDITS::TA
    library(RoMEBS)
    check_dictionary(ResultData = DataTA, Field, Values, wd, suffix)

[Package RoMEBS version 0.3.0 Index]