module1: module1

View source: R/module1.R

module1R Documentation

module1

Description

Module 1: Calculate Development Times for for Eggs and Larvae This function calculates the time for eggs and larvae development of the pine weevil.

Usage

module1(
  npop,
  data,
  params,
  stump_temp,
  first_generation,
  k,
  year,
  i,
  j,
  t0,
  gstyear,
  stagegg,
  rweevil,
  laval,
  stagel,
  t2
)

Arguments

npop

A single numeric value representing the number of individuals in the population.

data

A data frame containing daily climate data.

params

A list containing various model parameters, such as threshold temperatures and time limits.

stump_temp

A list containing stump temperature data.

first_generation

A list containing information about the first generation of insects.

k

A single numeric value representing the index for storing data in output vectors.

year

A numeric vector of length 'nd' containing the year for each day.

i

A single numeric value representing the current iteration of the outer loop.

j

A single numeric value representing the current iteration of the inner loop.

t0

A numeric vector of length 'npop' containing initial times for each individual in the population.

gstyear

A numeric vector of length 'npop' containing the year of the first generation for each individual.

stagegg

A numeric vector of length 'npop' containing the egg development time for each individual.

rweevil

A numeric vector of length 'npop' containing the reproduction time for each individual.

laval

A numeric vector of length 'npop' containing the larval development time for each individual.

stagel

A numeric vector of length 'npop' containing the stage of development for each individual.

t2

A numeric vector of length 'npop' containing the required degree days for larval development for each individual.

Value

A list containing updated values for various insect development times, including:

  • Index values for storing data in output vectors (k and j).

  • Current day (today).

  • Larval development times (laval).

  • Start day for larval development (start).

  • Year of the first generation for each individual (gstyear).

  • Egg development time for each individual (stagegg).

  • Reproduction time for each individual (rweevil).


Alessandra23/pineR documentation built on Aug. 26, 2023, 8 a.m.