pop_step: Surviving a non-selective process

Description Usage Arguments Details Value See Also Examples

View source: R/pop_step.R

Description

pop_step picks the individuals that will pass to the next development stage. This is a random process for every individual, which does not exert any selection pressure.

Usage

1
2
3
4
5
6
7
8
pop_step(
  start,
  start_comb = NA,
  result = NA,
  stepname = NA,
  surv_prob,
  max_vec_length = 1e+07
)

Arguments

start

column names of parental cohorts. character vector.

start_comb

all named columns in start are joined and returned as a column with the name of start_comb (character). Only used when start longer than 1.

result

name of the results column. character.

stepname

name of the new column of dfgenotype added by this function. character.

surv_prob

probability to survive this step and reach the next growth stage. numeric.

max_vec_length

used internally, a technical term, defining the maximum length of vectors to be used.

Details

Individuals that reach the next growth stage are picked by using rbinom. In contrast to sel_herb, pop_step does not exert any evolutionary selection pressure. When more than one column is selected with start, they are summed and the result is passed to the picking process. By setting start_comb the sum is added as a column to dfgenotype.

Value

A new column is added to dfgenotype containing the surviving individuals of the different genotypes.

See Also

quanti pop_germc

Examples

1
2
3
4
5
struc_preparation2(Rmx=10, af=c(0.01,0.8), epis=0, dom=1)
gen_freq(af=c(0.01,0.8), n_seeds=10000)
#How many individuals of each genotype will reach the next growth stage?
pop_step(start="initialSB",  stepname="survivingthewinter",
                            surv_prob=0.4)

PROSPER documentation built on July 2, 2020, 3:25 a.m.

Related to pop_step in PROSPER...