Description Usage Arguments Value Examples
View source: R/count_and_plot_mate_distribution.R
This just tallies up the information from the pedigree. It will plot things faceted by pop (over rows) and sexes (over columns).
1 |
P |
the pedigree from the simulation, like that returned in the |
A list with two components with names:
mate_counts
: A tibble with information about the number of mates with which
a parent produced offspring each year. It has the columns:
sex
: the sex of this parent
year
: the year during which the mating occurred
pop
: the population this parent was in
parent
: the ID of the parent
num_offs
: the number of offspring this parent had in total
num_mates
: the number of mates this parent had
plot_mate_counts
: a ggplot object, faceted on a grid by population in columns
and sex in rows. The x-axis is the number of offspring (in a season), the y-axis is the
number of mates in a season, and the fill color of the grid gives the number of parents
with that number of offspring and mates.
1 2 3 4 5 6 | result <- count_and_plot_mate_distribution(three_pops_no_mig_slurped_results$pedigree)
# have a look at the results:
result$mate_counts
result$plot_mate_counts
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.