View source: R/predict_phenology.R
predict_phenology | R Documentation |
Predict the phenology of fish using the effective value framework.
predict_phenology(data, dates, temperature, spawn.date, model)
data |
Data frame with dates and temperature. |
dates |
Date of temperature measurements. |
temperature |
Temperature measurements. |
spawn.date |
Date of spawning, given as a character string (e.g., "1990-08-18"). Must be year-month-day in format shown. |
model |
A data.frame with a column named "expression" or a character vector
giving model specifications. Can be obtained using |
A list with the following elements:
days_to_develop
: A numeric vector of length 1; number of predicted
days to hatch or emerge.
ef_table
: An n x 4 tibble (n = number of days to hatch or emerge) with
the dates, temperature, effective values, and cumulative sum of the
effective values.
dev.period
: a 1x2 dataframe with the dates corresponding to when your
fish's parent spawned (input with predict_phenology(spawn.date = ...)
)
and the date when the fish is predicted to hatch or emerge.
model_specs
: A data.frame with the model specifications.
Sparks, M.M., Falke, J.A., Quinn, T.A., Adkinson, M.D., Schindler, D.E. (2019). Influences of spawning timing, water temperature, and climatic warming on early life history phenology in western Alaska sockeye salmon. Canadian Journal of Fisheries and Aquatic Sciences, 76(1), 123–135.
library(hatchR)
# get model parameterization
sockeye_hatch_mod <- model_select(
author = "Beacham and Murray 1990",
species = "sockeye",
model_id = 2,
development_type = "hatch"
)
# predict phenology
sockeye_hatch <- predict_phenology(
data = woody_island,
dates = date,
temperature = temp_c,
spawn.date = "1990-08-18",
model = sockeye_hatch_mod
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.