Movatterモバイル変換


[0]ホーム

URL:


hatchRhatchR website

publicationdownloadstotal

Predict hatch and emergence timing for wildfish


hatchR is an R package for predicting hatch andemergence timing for a wide range of wild fishes using the effectivevalue framework (Sparks et al., 2019,Canadian Journal of Fisheriesand Aquatic Sciences, 76(1): 123-135).hatchRoffers users access to established phenological models and theflexibility to incorporate custom parameterizations using externaldatasets. The package includes functions for model selection, phenologyprediction, and visualization.hatchR is designed to beuser-friendly and accessible to a wide range of users, includingresearchers, managers, and educators.

A manuscript accompanying this package isin press atFisheries, forthcoming this Fall.

Installation

CRANProject Status: Active – The project has reached a stable, usable state and is being actively developed.

Install the released version ofhatchR fromCRAN:

install.packages("hatchR")

Install the latest development version ofhatchRfrom GitHub:

# install.packages("pak")pak::pak("bmait101/hatchR")

Interactive Shiny App

You can also use thehatchR Shiny app tointeractively predict fish developmental phenology. To run the app,visit thehatchRShiny app.

Contributing tohatchR

We encourage users to report bugs and/or contribute tohatchR. For more detail on how to do this, please seeour contributing guide (CONTRIBUTING.md).

Getting Help

There are several ways to get help withhatchR:

  1. Open a GitHub issuelink here.
  2. Post on a support website like Stack Overflow or CrossValidated.

Example Usage

Below we provide a brief example showing how to usehatchR. For a thorough introduction to the software,see our introductory vignettelinkedhere. For a list of all functions available inhatchR, see our function referencelinkedhere.

First we loadhatchR and helper packages byrunning

library(hatchR)library(ggplot2)# for additional plotting optionslibrary(lubridate)# for working with dates

hatchR requires three primary data inputs:

  1. Water temperature data
  2. Species-specific model parameters
  3. Spawning date or date ranges

The examplewoody_island dataset is included inhatchR and contains temperature data from Woody Island,Lake Iliamna, Alaska. It includes daily water temperature data from1990-1992. We can useplot_check_temp() to visually checkthe data. Spawning in this system typically peaks around August 18 andhatching and emergence are done before the start of the followingspawning season, so we can predict phenology within a subset of a year.Becauseplot_check_temp() returns aggplot2 object, we can add additionalggplot2 elements to customize the plots.

plot_check_temp(data = woody_island,dates = date,temperature = temp_c  )+# additional ggplot2 elements below this `+`geom_rect(aes(xmin =ymd("1990-08-18"),# spawn datexmax =ymd("1991-04-01"),# approx phenology window endymin =-10,# lower boundymax =25),# upper boundfill ="grey",alpha =0.01    )

Next, select hatch and emerge models we want to use to predictphenology:

sockeye_hatch_mod<-model_select(author ="Beacham and Murray 1990",species ="sockeye",model =2,development_type ="hatch"  )

Now we can predict phenology for the sockeye salmon using thepredict_phenology() function:

WI_hatch<-predict_phenology(data = woody_island,dates = date,temperature = temp_c,spawn.date ="1990-08-18",model = sockeye_hatch_mod  )

We can check the predicted phenology by running:

# see days to hatchWI_hatch$days_to_develop#> [1] 74# and development periodWI_hatch$dev_period#>        start       stop#> 1 1990-08-18 1990-10-30

Finally, we can visualize the predicted phenology usingplot_phenology():

plot_phenology(WI_hatch)

Imported Packages

hacthR imports the followingRpackages:

Suggested Packages

hatchR suggests the followingRpackages:

License

This project is licensed under the GNU General Public License,GPL-3.

USDA Disclaimer

hatchR project code is provided on an “as is” basisand the user assumes responsibility for its use. USDA Forest Service hasrelinquished control of the information and no longer has responsibilityto protect the integrity , confidentiality, or availability of theinformation. Any reference to specific commercial products, processes,or services by service mark, trademark, manufacturer, or otherwise, doesnot constitute or imply their endorsement, recommendation or favoring byUSDA Forest Service.


[8]ページ先頭

©2009-2025 Movatter.jp