Learn R Programming

pedigree (version 1.4.2)

countOff: Function that counts the number of offspring (and following generations for each individual in a pedigree.

Description

Function to count the number of offspring for each individual in a pedigree. With loops, offspring of later generations will be counted several times.

Usage

countOff(ped)

Value

Numeric vector with number of offspring for each individual in the pedigree.

Arguments

ped

data.frame with three columns: id,id parent1,id parent2

Author

Albart Coster

Examples

Run this code
example(countGen)
countOff(ped)

Run the code above in your browser using DataLab