gen_diploid {PROSPER} | R Documentation |
Diploid genetics: recombination of alleles
Description
gen_diploid
recombines the alleles of weeds with diploid genome.
Usage
gen_diploid(
start,
start_comb = NA,
result,
newseeds = get0("newseeds", envir = parent.frame(n = 1)),
max_vec_length = 1e+07
)
Arguments
start |
column names of parental cohorts. |
start_comb |
all named columns in |
result |
name of the results column. |
newseeds |
number of new seeds calculated by |
max_vec_length |
used internally, a technical term, defining the maximum length of vectors to be used. |
Details
gen_diploid
assumes independent allele recombination.
Value
A column with the name of result
and, if necessary, a column with the name of start_comb
is added to the data.frame
dfgenotype
.
warning
newseeds are always coerced to a whole number.
See Also
Examples
## Not run:
# generate a 'dfgenotype' data.frame:
struc_preparation2(Rmx=10, af=c(0.01, 0.2), epis=0, dom=1)
#Distribute 10000 individuals of the starting population across the genotypes.
#The two gene loci have initial frequencies of 0.01 and 0.8.
gen_freq(af=c(0.01,0.8), n_seeds=10000)
# The column "initialSB" represents the parent generation, which recombines and
#therefore defines the genetics of the new seeds
newseeds <- 10000
gen_diploid(start="initialSB", result="followingSB")
# If a second cohort is reprodusing in the same time
gen_diploid(start=c("initialSB", "followingSB"),
start_comb="two_cohorts_combind", result="followingSB2")
rm(dfgenotype, mf, newseeds, xprobab)
## End(Not run)
[Package PROSPER version 0.3.3 Index]