Publications by dogle
Updated dplyr Examples
Over the summer I made two posts about using the dplyr package. The first was an example of the dplyr verbs applied to fish data. The second was an example of modifications that I had made to lencat() to work better with dplyr. Since those posts, the pipe operator in dplyr has changed from %.% to %>%. Thus, I have updated those posts on ...
1147 sym 4 img
Efficiently Adding Gabelhouse Lengths and Relative Weights to a data.frame (using dplyr)
In this post on RPubs, I demonstrate how to use new functions (psdAdd() and wrAdd()) in the FSA package, along with functions in the dplyr package, to efficiently add Gabelhouse length category and relative weight variables for all species in a data.frame. This is a follow-up to my promise in this post. Let me know what you think.Filed under: F...
854 sym 4 img
2 New (Draft) Chapters for Intro Fish Science with R
I have added two new drafts of chapters for the Introductory Fisheries Science with R book. Both chapters are still rough, but feedback would be greatly appreciated. The first chapter is an introduction to basic data manipulations, largely using the (relatively) new dplyr package. Sections in this chapter include “Reading Data into R” (la...
1582 sym 4 img
Introduction to R Chapter for IFSWR Book
I have uploaded a draft of Chapter 1 — A Very Brief Introduction to R — to Introduction to Fisheries Science with R book. This chapter is very bare bones as there are many great introductions to R on the web and in other books. Thus, I focused on utility to fisheries analyses and forming a foundation for later chapters. I have also upload...
1375 sym 4 img
Plotting Fundamentals Chapter
I have uploaded a draft of Chapter 3 — Plotting Fundamentals — for the Introduction to Fisheries Analyses with R (IFAR) book (note the new name). This chapter is meant to be a quick introduction to plotting in base R for plots typically constructed by fisheries scientists (histograms, scatterplots, line plots, plots with intervals (e.g., ...
1322 sym 4 img
Data Wrangling Webinar and IFAR Chapter Update
A week or so ago I participated in the “Data Wrangling” webinar provided by RStudio. I found Garret Gromelund’s descriptions of the functions in tidyr and dplyr to be fantastic. A recording of the webinar is available here on the RStudio website. It is worth the 50 minutes or so to watch. If you are a fish-squeezer, then the content ...
1298 sym 4 img
Weight-Length & Condition Chapters Updated
Thanks to a couple of great reviews, I have updated the Weight-Length and Condition chapters of the forthcoming Introduction to Fisheries Analysis with R book. The suggestions resulted in some changes to the FSA package so you may want to update that as well. Changes to the Growth, Mortality, and Age Comparisons chapters will be coming soon (mayb...
952 sym 4 img
Mortality & Age Comparisons Chapters
Thanks to some very thoughtful reviews, I have dramatically updated the Mortality and Age Comparisons chapters in the Introduction to Fisheries Analysis with R book. Changes to the Age Comparisons chapter in particular resulted in major changes to the FSA package. Specifically, I reversed the formula in ageBias(). Thus, if you use this functi...
1067 sym 6 img
Changes to Von B Growth Modeling in FSA
In previous versions of FSA, growthModelSim() was used to produce a scatterplot of length-age data with a von Bertalanffy model superimposed where the parameters of the model were linked to slider bars that allowed the model to be dynamically changed by the user. This function has been removed from the most recent version of FSA, but the functi...
1450 sym 6 img
Recruitment Chapter for IFAR
I have added a very rough draft of the Recruitment chapter to the Introduction to Fisheries Analysis with R (IFAR) page. This chapter is a complete re-working of the old Stock-Recruitment vignette and includes a section on fitting non-linear stock-recruitment functions, computing spawning potential ratio (SPR) values, and computing year-class s...
1432 sym 6 img