Learn R Programming

RoME (version 0.2.4)

check_stratum_code: Function to check the correct codification of the strata in haul data table (TA).

Description

This function verifies the correctness of the stratum code, following the stratification scheme table in the MEDITS protocol.

Usage

check_stratum_code(ResultDataTA,year,Strata,wd,suffix)

Value

The function returns always TRUE, because the outcome of the function is a warning that does not lock the execution of the 'RoME' checks. The presence of inconsistencies in the data is reported in the logfile stored in the "Logfiles" subdirectory of the "wd" user-defined directory.

Arguments

ResultDataTA

Haul data table according to MEDITS protocol (TA).

year

reference year for the analysis

Strata

Stratification scheme according to MEDITS protocol.

wd

Working directory selected by the user.

suffix

Suffix string of the Logfile.

Author

I. Bitetto, W. Zupa

Details

This function checks if the stratum code associated to each haul is consistent with the code reported in MEDITS manual and in the table Stratification scheme, corresponding to the associated depth range.

References

For the definition of the strata, please refer to: Anonymus. 2017. MEDITS-Handbook. Version n. 9. MEDITS Working Group. 106 pp.

Examples

Run this code
TA = RoME::TA
wd=tempdir()
year = 2007
suffix= "2020-03-05_time_h17m44s55"
check_stratum_code(TA,year,Strata=RoME::stratification_scheme,wd,suffix)

Run the code above in your browser using DataLab