setCultivars {landsepi}R Documentation

Set cultivars

Description

Updates a LandsepiParams object with cultivars parameters

Usage

setCultivars(params, dfCultivars)

Arguments

params

a landsepiParams object.

dfCultivars

a data.frame defining the cultivars (see details). It can be generated manually or, alternatively, via loadCultivar.

Details

dfCultivars is a dataframe of parameters associated with each host genotype (i.e. cultivars, lines) when cultivated in pure crops. Columns of the dataframe are:

The data.frame must be defined as follow (example):

cultivarName initial_density max_density growth_rate reproduction_rate yield_H yield_L yield_I yield_R planting_cost market_value
Susceptible 0.1 2.0 0.1 0.0 2.5 0.0 0.0 0.0 225 200
Resistant1 0.1 2.0 0.1 0.0 2.5 0.0 0.0 0.0 225 200
Resistant2 0.1 2.0 0.1 0.0 2.5 0.0 0.0 0.0 225 200

Value

a LandsepiParams object

See Also

loadCultivar

Examples

## Not run: 
simul_params <- createSimulParams()
cultivar1 <- loadCultivar(name = "Susceptible", type = "growingHost")
cultivar2 <- loadCultivar(name = "Resistant", type = "growingHost")
cultivars <- data.frame(rbind(cultivar1, cultivar2), stringsAsFactors = FALSE)
simul_params <- setCultivars(simul_params, cultivars)
simul_params@Cultivars

## End(Not run)

[Package landsepi version 1.4.0 Index]