Learn R Programming

landsepi (version 1.5.1)

updateReproSexProb: Update the probability of sexual reproduction

Description

set the probabilities for an infectious host to reproduce via sex rather than via cloning at every time step. Note that time parameters must be set before updating sexual reproduction probabilities.

Usage

updateReproSexProb(params, vec)

Value

a LandsepiParams object updated

Arguments

params

a LandsepiParams object

vec

a vector of size TimeParam$nTSpY +1 (season end) with the probabilities for an infectious host to reproduce via sex rather than via cloning at each time step.

Examples

Run this code
if (FALSE) {
simul_params <- createSimulParams()
simul_params <- setTime(simul_params, Nyears=10, nTSpY=120)
simul_params <- setPathogen(simul_params, loadPathogen("rust"))
repro_sex_probs <- c(rep(0.0, 120), 1.0)  
simul_params <- updateReproSexProb(simul_params, repro_sex_probs)
simul_params@Pathogen
}

Run the code above in your browser using DataLab