Learn R Programming

landsepi (version 1.5.1)

allocateCultivarGenes: Allocate genes to a cultivar

Description

Updates a LandsepiParams object with, for a given cultivar, the list of genes it carries

Usage

allocateCultivarGenes(
  params,
  cultivarName,
  listGenesNames = c(""),
  force.clean = FALSE
)

Value

a LandsepiParams object

Arguments

params

a LandsepiParams object.

cultivarName

the name of the cultivar to be allocated.

listGenesNames

the names of the genes the cultivar carries

force.clean

force to clean previous allocated genes to all cultivars

See Also

setGenes, setCultivars

Examples

Run this code
if (FALSE) {
simul_params <- createSimulParams()
gene1 <- loadGene(name = "MG 1", type = "majorGene")
gene2 <- loadGene(name = "MG 2", type = "majorGene")
genes <- data.frame(rbind(gene1, gene2), stringsAsFactors = FALSE)
simul_params <- setGenes(simul_params, genes)
cultivar1 <- loadCultivar(name = "Susceptible", type = "wheat")
cultivar2 <- loadCultivar(name = "Resistant", type = "wheat")
cultivars <- data.frame(rbind(cultivar1, cultivar2), stringsAsFactors = FALSE)
simul_params <- setCultivars(simul_params, cultivars)
simul_params <- allocateCultivarGenes(simul_params, "Resistant", c("MG 1", "MG 2"))
simul_params@CultivarsGenes
}

Run the code above in your browser using DataLab