w_offspring {purgeR}R 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)

[Package purgeR version 1.8.2 Index]