View source: R/Methods-LandsepiParams.R
| allocateCultivarGenes | R Documentation | 
Updates a LandsepiParams object with, for a given cultivar, the list of genes it carries
allocateCultivarGenes(
  params,
  cultivarName,
  listGenesNames = c(""),
  force.clean = FALSE
)
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  | 
a LandsepiParams object
setGenes, setCultivars
## Not run: 
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
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.