w_offspring: Offspring

View source: R/fitness.R

w_offspringR Documentation

Offspring

Description

Counts the number of offspring for individuals in the pedigree.

Usage

w_offspring(ped, name_to, dam_offspring = TRUE, sire_offspring = TRUE)

Arguments

ped

A dataframe containing the pedigree. Individual (id), maternal (dam), and paternal (sire) identities are mandatory columns.

name_to

A string naming the new output column.

dam_offspring

Compute dam offspring (TRUE by default).

sire_offspring

Compute sire offspring (TRUE by default).

Value

The input dataframe, plus an additional column indicating the total number of offspring.

Examples

data(arrui)
dama <- w_offspring(arrui, name_to = "P")
head(arrui)

purgeR documentation built on Aug. 16, 2023, 9:07 a.m.