Skip to contents

Updates the environmental data component of a Bioenergetic object with new temperature information.

Usage

set_environment(x, temperature_data)

Arguments

x

Bioenergetic object

temperature_data

Data frame with Day and Temperature columns

Value

The Bioenergetic object x with its environmental_data$temperature component replaced by temperature_data (interpolated to fill missing days if needed), and fitted reset to FALSE.

Examples

# \donttest{
bio <- Bioenergetic(
  species_params = list(
    consumption = list(CEQ = 1, CA = 0.303, CB = -0.275, CQ = 0.06)
  ),
  species_info  = list(common_name = "Example fish")
)
#> Bioenergetic object created for: Example fish
temp <- data.frame(Day = 1:365, Temperature = rep(15, 365))
bio <- set_environment(bio, temp)
# }