8  morphmat

R has become a foundational tool for quantitative fisheries research, with specialized packages such as FSA, ggFishPlots, and ss3sim enhancing the functionality of base R and more generalized packages to provide fisheries scientists with an ever-growing toolbox for data analysis and visualization. I will create an open-source R package, morphmat, which will allow fisheries scientists and managers to implement the multitude of modeling approaches identified through my synthesis research. The package will include user-friendly functions for estimating size at morphometric maturity, along with guidelines for choosing the optimal method for a given dataset and correctly interpreting results. Both novel and historically popular (e.g., broken-stick regression) methods will be included, and users will be able to obtain SM50 estimates from over a dozen different approaches with a single function call. Crucially, by combining code for the various models within a single package, morphmat will represent the first software tool enabling the application of multi-model inference to SM50 estimation, avoiding the arbitrary selection of a single “best” model (Katsanevakis 2006; Grueber et al. 2011) By increasing the accessibility of modern statistical methods for estimating SM50, I hope to facilitate the widespread adoption of improved SM50 modeling procedures.

I will follow the best practices for package development described by Wickham and Bryan (2023), including comprehensive function documentation with illustrative examples, informative package metadata, and automated (unit) testing (Wickham 2011). I will also refer to the FAIR Principles for Research Software (FAIR4RS Principles) when developing and sharing morphmat(Barker et al. 2022) and generate appropriate metadata using the CodeMeta format (https://codemeta.github.io/).

A peach-colored hexagon with the word morphmat above the outline of a crab placed inside a scatter plot.

Hex sticker logo for the R package “morphmat”

In conjunction with vignettes included in the package, a morphmat website (built using pkgdown and GitHub pages) will host more detailed articles explaining how to use the package. The pkgdown articles will allow me to show how morphmat can work in concert with large packages like glmmTMB without requiring those packages to be added as formal dependencies. Additionally, articles can include many more (and more complex) graphics than it would be feasible to include within a vignette. The current version of the website can be found here: https://rmk118.github.io/morphmat/

As well as submitting morphmat to the Comprehensive R Archive Network (CRAN), I will ensure that morphmat meets the rOpenSci guidelines for inclusion in their suite of packages. I will submit morphmat to rOpenSci for software peer review, during which two reviewers will provide feedback on the quality, documentation, and clarity of the package. In addition to receiving useful feedback from experienced developers, submitting a package to rOpenSci will allow me to receive support with ongoing maintenance issues such as those associated with updates to R, dependencies, and CRAN policies, as well as promotion of the package on various social media platforms (Anderson et al. 2024).

Acceptance into the rOpenSci repository generally results in a fast-tracked review process for accompanying manuscripts submitted to the Journal of Open Source Software. Having a published manuscript describing morphmat will maximize the potential for widespread adoption by fisheries scientists and other biologists interested in size at maturity determination. I also hope that morphmat could be included in more domain-specific repositories, such as the NOAA Fisheries Integrated Toolbox or the fishR collection of packages, which would provide additional exposure to potential users who could benefit from these tools.

References

Anderson, Brooke, Scott Chamberlain, Laura DeCicco, Julia Gustavsen, Anna Krystalli, Mauro Lepore, Lincoln Mullen, et al. 2024. rOpenSci Packages: Development, Maintenance, and Peer Review. https://doi.org/10.5281/ZENODO.2553043.
Barker, Michelle, Neil P. Chue Hong, Daniel S. Katz, Anna-Lena Lamprecht, Carlos Martinez-Ortiz, Fotis Psomopoulos, Jennifer Harrow, et al. 2022. “Introducing the FAIR Principles for research software.” Scientific Data 9 (1): 622. https://doi.org/10.1038/s41597-022-01710-x.
Grueber, C. E., S. Nakagawa, R. J. Laws, and I. G. Jamieson. 2011. “Multimodel Inference in Ecology and Evolution: Challenges and Solutions.” Journal of Evolutionary Biology 24 (4): 699–711. https://doi.org/10.1111/j.1420-9101.2010.02210.x.
Katsanevakis, Stelios. 2006. “Modelling Fish Growth: Model Selection, Multi-Model Inference and Model Selection Uncertainty.” Fisheries Research 81 (2): 229–35. https://doi.org/10.1016/j.fishres.2006.07.002.
Wickham, Hadley. 2011. “Testthat: Get Started with Testing.” The R Journal 3: 5–10. https://journal.r-project.org/archive/2011-1/RJournal_2011-1_Wickham.pdf.
Wickham, Hadley, and Jennifer Bryan. 2023. R Packages. 2nd ed. Sebastopol: O’Reilly Media, Incorporated. https://r-pkgs.org/.