| RoMEBScc | R Documentation |
The function RoMEBScc performs a full suite of automated, non-stopping quality checks on survey data for the Black Sea. It invokes the same sequence of validation routines as RoMEcc (for TA, TB, TC, TE and TL tables) but uses tables and parameters tailored to Black Sea strata, species and maturity references.
RoMEBScc(
TA,
TB,
TC,
TE = NA,
TL = NA,
wd,
suffix = NA,
verbose = TRUE,
Stratification = RoME::stratification_scheme,
Ref_list = RoME::TM_list,
DataTargetSpecies = RoME::DataTargetSpecies,
Maturity = RoME::Maturity_parameters,
ab_parameters = RoME::LW,
stages_list = RoME::mat_stages,
assTL = RoME::assTL,
zip = TRUE
)
TA |
Haul metadata table (TA) |
TB |
Catch data table (TB) |
TC |
Biological data table (TC) |
TE |
Individual biological data table (TE), or |
TL |
Litter table (TL), or |
wd |
Working directory path where "Logfiles" and "Graphs" subfolders are written. |
suffix |
Character suffix for output filenames. If |
verbose |
Logical; if |
Stratification |
Stratification scheme object; defaults to |
Ref_list |
Reference list for tow metadata; defaults to |
DataTargetSpecies |
Species-specific reference dataset; defaults to |
Maturity |
Maturity-parameter table; defaults to |
ab_parameters |
Length-weight parameter table; defaults to |
stages_list |
Maturity-stage lookup table; defaults to |
assTL |
Category-subcategory mapping for TL; defaults to |
zip |
Logical; if |
RoMEBScc checks can be used to integrate a list of common quality checks on survey datafrom Black Sea. This function calls all the functions built in the package in an ordered way to perform a complete quality check of TX data available. The order of the checks in RoME was implemented in a defined sequence to avoid cascade errors due to the correction of a previous error. No automatic correction is implemented in 'RoME'. 'RoME' stops if an error occurs; then the user has to correct the error and run again the code to continue with the other checks. The function runs on a complete time series dataset, checking year after year, until the end of the time series. After the checks of the mandatory fields and the controlled vocabulary, that are carried out for all the TX tables, the specific checks on each kind of TX table are performed. Finally, RoME provides a list of cross checks aimed to guarantee the consistency among the data tables.
Some functions included in the 'RoME' library and used by RoME function need specific dictionaries or tables. It is the case of Stratification, TM_list, DataTargetSpecies, Maturity_parameters, mat_stages and assTL tables. All of them are provided by default in this library. Anyway, the user has the possibility to provide ad hoc modified versions of these tables adapting the checks to specific needs.
The function does not correct data, but it detects the errors, warning the user that there is the possibility of one or more errors, specifying the type of the error and easing the data correction. If parameter verbose=TRUE returns a series of text output in console to let the user to trace the state of the checks. All the output of the functions are stored in the user defined working directory wd and in the sub-directory there resident. In the Lofile subfolder are stored the logfiles of each run of the function.
W. Zupa
Anonymus. 2017. MEDITS-Handbook. Version n. 9. MEDITS Working Group. 106 pp. https://www.sibm.it/MEDITS%202011/principaledownload.htm
wd <- tempdir()
# Example using TA, TB, TC slices for 2018
TA_sub <- RoME::TA[RoME::TA$YEAR == 2018, ]
TB_sub <- RoME::TB[RoME::TB$YEAR == 2018, ]
TC_sub <- RoME::TC[RoME::TC$YEAR == 2018, ]
# TE/TL not used in this example
RoMEBScc(
TA_sub, TB_sub, TC_sub, TE = NA, TL = NA,
wd = wd, suffix = "BS_test",
verbose = FALSE
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.