summarize_offspring_and_mate_numbers {CKMRpop}R Documentation

Summarize the distribution of number of offspring and number of mates

Description

More later

Usage

summarize_offspring_and_mate_numbers(
  census_postkill,
  pedigree,
  deaths,
  lifetime_hexbin_width = c(1, 1),
  contrib_bin_width = 0.01
)

Arguments

census_postkill

a tibble with the postkill numbers of individuals. This is here so we know the total number of individuals that could have reproduced in a given year.

pedigree

a tibble with columns of year, kid, pa, and ma. The IDs of the' individuals must by like MX_Y where M means male, X is the birth year, and Y is the unique ID number.

deaths

a tibble with columns of ID, year, and age, giving the years and ages at which different individuals died.

lifetime_hexbin_width

a vector of length two. The first element is the width in the age direction of each hexbin and the second is the width in the lifetime number of offspring direction for the plot_lifetime_output_vs_age_at_death output plot.

contrib_bin_width

width of bins of histogram of contribution of parents of each age and sex to the offspring.

Value

A list with three components, each of them a ggplot object:

Examples

# get stored slurped output for an example
X <- species_1_slurped_results
g <- summarize_offspring_and_mate_numbers(
  X$census_postkill,
  X$pedigree,
  X$deaths
)

# Now g is a list holding three plots, accessible like this:

# g$plot_age_specific_number_of_offspring

# g$plot_lifetime_output_vs_age_at_death

# g$plot_fraction_of_offspring_from_each_age_class


[Package CKMRpop version 0.1.3 Index]