DESCRIPTION: Updated Authors@R format, added
Language field, and moved shinyjs and
svDialogs to Suggests..Rd documentation: Fixed unclosed
\references{} brackets, resolved ‘Invalid URL’ checks,
corrected syntax errors, and removed typos across all manual files.packageVersion() with
meta$Version in inst/CITATION for
compatibility when the package is not yet installed.tempdir().check_individual_weightTE()
caused by missing LENGTH_CLASSES_CODE values (handled
NA and added safety checks).check_individual_weightTE() where incorrect length-weight
parameters were applied due to an index bug.check_spawning_period(): TA and TC records are
now matched on both HAUL_NUMBER and COUNTRY,
avoiding incorrect month assignments when haul numbers are shared across
countries.run_RoME_app(): launches an embedded Shiny
graphical user interface for running RoME analyses directly from the
package environment.stratification_scheme_rapana.check_weight(), check_length(),
check_individual_weightTC(),
check_smallest_mature(), check_species_TBTC(),
check_spawning_period(), check_dictionary(),
and check_raising(). New functions:
check_swept_area() and plot_abundance().
Updated check_distance() to use
geosphere::distGeo().RDBFIS III Fixes
check_weight() now logs detailed records of species with mean weights outside reference ranges into a CSV file instead of writing extensive messages in the .dat log, ensuring clearer logs and easier downstream analysis. Plots are now saved exclusively to files and are no longer displayed interactively, and species plots are limited to those with at least 5 observations to reduce unnecessary graph generation. The function was adapted to work with the updated DataTargetSpecies table
check_length() now saves all detailed inconsistencies into a CSV file instead of writing verbose messages in the .dat log, improving clarity and data traceability, using the new updated DataTargetSpecies table.
check_individual_weightTC changed to save the table for the comparison between the estimated vs observed weights in TC.
the check_smallest_mature function was adapted to work with the updated DataTargetSpecies table
check_smallest_mature: Improved handling of non-numeric values in Maturity_parameters and introduced a 10% buffer when checking lengths. Added a CSV output listing all records where mature individuals are smaller than reference sizes, including the threshold size and bibliographic references. The function has also been adapted to the new format of DataTargetSpecies.
check_species_TBTC function improved with more robust data filtering checks and streamlined log file content to reduce verbosity. The function has also been adapted to the new format of DataTargetSpecies.
check_spawning_period now logs all maturity-stage consistency warnings into a dedicated CSV file rather than filling the .dat log with verbose messages, improving traceability and downstream analyses. The function robustly handles missing (NA) values in both maturity parameters and survey data to avoid false positives. It now separates warnings for immature individuals observed within the spawning period but above size thresholds, and for mature individuals found outside the spawning period, distinguishing whether they fall below bibliographic size limits. CSV outputs include comprehensive details such as spawning months, size thresholds, and the type of inconsistency detected. The function has been adapted to work with the updated DataTargetSpecies table.
check_dictionary() now reports the actual invalid value in every log entry. Previously it said “value not allowed for X”; now each line includes the offending string or NA (e.g., “Haul 109: value ‘XYZ’ not allowed for COURSE in TA”), and messages are batched into a single writeLines() call to eliminate hundreds of small I/O operations. The function was dramatically rebuilt to optimize computational time, achieving a runtime reduction of >90% for this routine (e.g., from 12.91 s down to 0.07 s).
check_length(): the internal per-row loop has been replaced with vectorized index computations (which() + match()), and all I/O is consolidated into single write.table() and write() calls. These changes preserve the original logic and output formats (including handling of missing, negative, and out-of-range classes with the updated DataTargetSpecies), while delivering a around 66% reduction in the routine’s execution time (e.g., from 2.77 s down to 0.93 s).
Replaced all class(…) == checks with inherits(…) to improve code robustness and avoid R CMD check notes. Fixed documentation mismatches, ensuring consistency between code default arguments and Rd files. Corrected a misplaced brace in the Rd documentation of check_position_in_Med(), resolving a note from R CMD check.
NEW function: check_swept_area the function checks the key swept-area field used later to standardise abundance indices. It scans the TA file for the chosen year, flags and removes any haul whose wing opening, distance or depth is missing, non-numeric or would lead to an impossible swept-area value, and logs each problem haul in detail. By doing this before abundance calculations begin, the function ensures that every density estimate rests on a solid, verifiable swept-area input.
updated function: check_raising check_raising() has been rewritten to use native dplyr operations, which removes the old explicit loops and makes the code markedly faster. The routine now calculates the raising factor molt for every TC subsample and records, one line at a time, any situation in which that ratio falls below one. It also adds a new consistency test that compares the grand total raised from TC with both the sex-specific counts and the overall total reported in TB, logging every discrepancy with haul and species identifiers so that problematic records are easy to trace. Rows that lack swept-area information or contain invalid totals are discarded but never cause the function to stop; they are simply listed in the log file. In line with the behaviour of plot_abundance(), the function now returns TRUE when no inconsistencies are found and FALSE otherwise, while continuing execution to the end in all cases.
NEW function: plot_abundance() Introduces an automated routine that reads TA and TB tables, computes swept-area-standardised abundance indices (n/km^2) per haul and species, applies quality-control filters (swept area missing/zero, invalid totals, minimum number of hauls), and produces box-plots in chunks of maximum 36 species each. All images are saved to Graphs/Abundance and a detailed logfile is written to Logfiles/.
updated function: check_distance() Replaced the custom distance calculation with the function geosphere::distGeo() for computing geodesic distances between shooting and hauling coordinates. This modification avoids the issue of estimating zero distances when the same value is reported for both shooting and hauling longitude or latitude in a given haul. Computational efficiency was improved by vectorizing the distance computation using mapply() instead of a row-wise loop.
Improved check_spawning_period() by matching TA and TC records on both HAUL_NUMBER and COUNTRY, avoiding incorrect month assignments when haul numbers are shared across countries.
Added an embedded Shiny application to the package: run_RoME_app(). It provides a graphical user interface for running RoME analyses directly from the package environment.