Learn R Programming

RoME (version 0.2.4)

check_quasiidentical_records: Function checking the presence of quasi-identical records.

Description

Two or more "quasi-identical records" occurred when all the fields are respectively equal, except: TYPE_OF_FILE, AREA, GEAR, VESSEL, YEAR, RIGGING, DOORS, for TA table; TYPE_OF_FILE, AREA, VESSEL, YEAR for TB and TC tables.These specific fields are allowed to be identical.

Usage

check_quasiidentical_records(Result,year,wd,suffix)

Value

The function always returns TRUE reporting the presence of quasi-identical records in the logfile.

Arguments

Result

Haul data table according to MEDITS protocol (TA), or Catch data table (TB) or Biological data table (TC).

year

reference year for the analysis

wd

Working directory selected by the user.

suffix

Suffix string of the Logfile.

Author

I. Bitetto, W. Zupa

Details

The checks always returns TRUES generating warning messages in the logfile if any quasi-identical record was found. In a given survey the following fields (of TA table) should be identical: 'TYPE_OF_FILE', 'AREA', 'VESSEL', 'GEAR', 'RIGGING', 'DOORS' and 'YEAR'. The function checks whether any differences occur in these fields in each yearly survey. The same think is done for all the other tables where these fields occur.

References

Anonymus. 2017. MEDITS-Handbook. Version n. 9. MEDITS Working Group. 106 pp.

Examples

Run this code
wd=tempdir()
suffix= "2020-03-05_time_h17m44s55"
year=2007
# example using TA table
TA <- RoME::TA
check_quasiidentical_records(TA,year,wd,suffix)

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

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

Run the code above in your browser using DataLab