IGOR is an R Shiny tool that allows you to do the following tasks:
- Estimate age and growth parameters for a variety of model (Gompertz, linear, logistic, Schnute, or von Bertalanffy).
- Estimate an Otolith Weight vs. Age predictive model (linear or piecewise) with user data.
- Use an existing Otolith Weight vs. Age model to predict ages for fish with known otolith weights.
Install TMB (https://github.com/kaskr/adcomp/wiki/Download) using the install.packages("TMB")
command in the R terminal.
TMB requires the installation of Rtools, a program which contains a C++ compiler.
For Windows users, you should have Rtools installed. During installation, you need to edit the PATH
variable to make sure that c:\Rtools\bin;
, and c:\Rtools\mingw_64\bin;
or c:\Rtools\mingw_32\bin;
(64-bit or 32-bit version) are included in PATH
as these directories contain the C++ gcc compiler. The command Sys.getenv("PATH")
can be used in R to check you PATH
variables. For futher directions, refer to Install Rtools for Windows.
For Mac users, you may need to install command line developer tools by running xcode-select --install
in a terminal.
Download the Shiny_IGOR folder to a local directory. To run the app, you can:
- Within RStudio, open the
ui.R
,server.R
, orglobal.R
files and click the Run App button. - From an R terminal, type
R -e "shiny::runApp('~/path_to_this_shiny_app')"
. You should see something likehttp://127.0.0.1:6108
(the port number is randomly selected), and then navigate your browser to that address.
There are two ways to feed in fish age and length data:
- There are two file upload panels when you start the app and to run a growth curve model analysis. You can upload a file with specified format as Length vs. Age data.
- If you have run an Age vs. Otolith Weight model, you can use the predicted data as fish age and length data for this analysis.
The raw data from upload or predictions from otolith weight will show up in the Input Data tab under the Length vs. Age Data tab. You can then filter the data as you like and confirm the data choice. The filtered data will show up in the Selected Data tab under the Length vs. Age Data tab.
After you choose the starting values for the model, you would see the result of the run in the Summary & Plot tab. You can also download the model for later use. In addition, the predicted ages will appear in the Fitted Values tab and you could this data for a growth curve analysis.
You now have an Age vs. Otolith Model and a data file that has otolith weights and you want to predict the ages for these fish. In the Use An Existing Otolith Weight vs. Age Model tab, you should see a file upload panel where you would upload an R object of type lm
and a csv file that contains all your data. Your predicted ages will appear in a data table on the right.