Learn R Programming

hatchR (version 0.3.2)

predict_phenology: Predict phenology of fish

Description

Predict the phenology of fish using the effective value framework.

Usage

predict_phenology(data, dates, temperature, spawn.date, model)

Value

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.

Arguments

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 model_select() or using you own data to obtain a model expression (see fit_model).

References

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.

Examples

Run this code
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
)

Run the code above in your browser using DataLab