RoME {RoME} | R Documentation |
The function calls all the functions built in the package in an ordered way to perform a complete quality check of TX data available. The check is performed simultaneously on the files that can contain also data of more than one year.
RoME(TA,TB,TC,TE=NA,TL=NA,wd,suffix=NA, create_RSufi_files = FALSE, create_global_RSufi_files=FALSE, Year_start=NA,Year_end=NA,verbose =TRUE,Stratification=RoME::stratification_scheme, TM_list=TM_list,DataTargetSpecies=DataTargetSpecies, Maturity_parameters=Maturity_parameters, ab_parameters=RoME::LW, stages_list=RoME::mat_stages,assTL=assTL)
TA |
Haul data table according to MEDITS protocol (TA) |
TB |
Catch data table according to MEDITS protocol (TB) |
TC |
Biological data table according to MEDITS protocol (TC) |
TE |
Individual biological data table according to MEDITS protocol (TE) if available, if TE data are not available, use NA. |
TL |
Litter data table according to MEDITS protocol (TL) if available, if TL data are not available, use NA |
wd |
working directory path defined by the user |
suffix |
Suffix string of the Logfile, in case it |
create_RSufi_files |
boolean variables used to choose if create R-sufi files. The files are saved in the R-sufi directory and named with a suffix of the year and GSA |
create_global_RSufi_files |
boolean variables used to choose if global R-sufi files should be created from an year to another year |
Year_start |
numeric value indicating the starting year for the production of R-sufi file. This parameter must to be reported in case |
Year_end |
numeric value indicating the ending year for the production of R-sufi files |
verbose |
... |
Stratification |
Stratification scheme according to MEDITS protocol. |
TM_list |
TM_list reference list |
DataTargetSpecies |
Information related to target species. |
Maturity_parameters |
Information related to sex and maturity from literature or other sources. |
ab_parameters |
dataframe containing the a and b parameters of the length-weight relationships |
stages_list |
Table of maturity stages. |
assTL |
data frame with the association between TL (litter table) categories and sub-categories |
RoME
checks can be used to integrate a list of common quality checks on survey data. 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.
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=NA DataTA = RoME::TA DataTB = RoME::TB DataTC = RoME::TC DataTE = NA DataTL = NA RoME(DataTA, DataTB,DataTC,DataTE,DataTL, wd, suffix, Stratification=RoME::stratification_scheme, TM_list=RoME::TM_list,DataTargetSpecies=RoME::DataTargetSpecies, Maturity_parameters=RoME::Maturity_parameters,ab_parameters=RoME::LW, stages_list=RoME::mat_stages,assTL=RoME::assTL)