Learn R Programming

fb4package (version 2.0.0)

set_environment: Set Environmental Data for Bioenergetic Objects

Description

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

Usage

set_environment(x, temperature_data)

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.

Arguments

x

Bioenergetic object

temperature_data

Data frame with Day and Temperature columns

Examples

Run this code
# \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")
)
temp <- data.frame(Day = 1:365, Temperature = rep(15, 365))
bio <- set_environment(bio, temp)
# }

Run the code above in your browser using DataLab