Age-Length Keys in FSA

[This article was first published on fishR » R, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

I have updated the age-length key related functions in FSA and the age-length key vignette.  The details are below.   Let me know if you have questions or suggestions.

FSA Changes

All code that used ageKey(), ageKeyPrep(), and ageKeyPlot() should be updated!!  See below.

  • ageKey()DEPRECATED (will be removed by v1.0.0).  See alkIndivAge().  I made this name change because as I added more age-length key functionality (see below) the very generic sounding ageKey() seemed too broad for the specificity of its purpose (apply the Isermann and Knight method).
  • alkIndivAge() — Added, was ageKey().  Added seed= which can be set to a number to serve as a random seed which will allow reproducibility of results.  Made changes to minimize spurious warnings.  Modified to better handle when an age-length key has a whole row of missing data (as would happen if as.fact=TRUE and drop.levels=FALSE in lencat()).
  • ageKeyPlot()DEPRECATED (will be removed by v1.0.0).  See alkPlot().  Changed to be consistent with the other functions.
  • alkPlot() — Removed bubble.ylab= and, accordingly, modified ylab=.  Added the ability to remove the legend from area plots and added pal= so that the user can choose a palette for the different colors of areas, bars, and lines in the various plots.  Added some checks on the structure of the age-length key.
  • ageKeyPrep()DEPRECATED (will be removed by v1.0.0).  See alkPrep().  Changed to be consistent with the other functions.
  • alkPrep() — Added, was ageKeyPrep().  Added some checks on the structure of the age-length key.
  • alkAgeDist() — Added this function to compute the proportion of fish in each age in the larger sample, with a SE, following the methods of Quinn and Deriso.
  • alkMeanVar() — Added this function to compute the mean of a variable at each age (e.g., mean length-at-age) for the larger sample following the methods of Bettoli and Miranda.
  • Further changes can be seen in the NEWS file.

Vignette Changes

Modified the description of ALK dramatically by developing the general method first and then proceeding to the Isermann and Knight method (the original vignette was completely focused on the Isermann and Knight method).  Added sections for computing the proportion of fish at each age and the mean of a variable at each age for other than the Isermann and Knight method (see alkAgeDist() and alkMeanVar() above).  Demonstrated one method for computing smooth ALKs.  Demonstrated, with a smooth ALK, how to statistically compare two or more ALKs.

The new vignette will be a chapter in a new book and is available here.


Filed under: Administration, Fisheries Science, R Tagged: Age, Age-Length Key, FSA, R

To leave a comment for the author, please follow the link and comment on their blog: fishR » R.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)