Learn R Programming

purgeR (version 1.8.2)

w_offspring: Offspring

Description

Counts the number of offspring for individuals in the pedigree.

Usage

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

Value

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

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).

Examples

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

Run the code above in your browser using DataLab