**fishR » R**, and kindly contributed to R-bloggers)

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

**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 on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...