Description Usage Arguments Value Note Author(s) Examples
This function is mostly for simulation work and functions to produce a set of offspring for the individuals passed.
1 |
mom |
This is the 'maternal' individual in that all the
metadata in the |
dad |
This is the 'paternal' individual and will contribute only half of its genetic compliment to the offspring. |
N |
The number of offspring to produce. |
A data.frame
of offspring.
There are several 'hidden' things in this routine. First, if you do not
pass a 'dad' object, it will assume you want a selfed offspring. Second, it
will by default only make a single offspring. Next, if you have a column
labeled "Sex" it will make a random selection of which sex each offspring
should be and only mate the opposite sexes based upon the levels of the values in
the Sex column. Finally, if there are columns ID and OffID in the mom, then all
offspring will have the same ID as the mom but will have OffID equal to 1:N to
conform with how the functions like paternity()
operate. If you do not
have ID and OffID then it will do nothing special. This can be more than
one individual mom & dad, but if you pass several, they will all have the same
number of offspring (if you only specify a single value of N) or different
numbers of offspring (if N is passed as a vector and is of length equal to
that of mom and dad)
Rodney J. Dyer rjdyer@vcu.edu
1 2 3 4 | f <- data.frame(Allele=LETTERS[1:2], Frequency=c(0.5,0.5))
adults <- data.frame( ID=1:2, Locus=make_loci(f,N=2) )
adults
mate( adults[1,], adults[2,], N=10)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.