ped_maternal: Maternal effects

View source: R/maternal.R

ped_maternalR Documentation

Maternal effects

Description

For every individual in the pedigree, it will assign them their maternal (or paternal) value for an observed variable of interest.

Usage

ped_maternal(ped, value_from, name_to, use_dam = TRUE, set_na = NULL)

Arguments

ped

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

value_from

Name of the column of interest.

name_to

A string naming the new output column.

use_dam

Extract maternal values. If false, parental values are returned.

set_na

When maternal values are unknown, NA values are generated by default. This option allows to set a different value.

Value

The input dataframe, plus an additional column with maternal (or paternal) values of a variable of interest.

Examples

# To assign maternal inbreeding as a new variable, we can do as follows:
data(dama)
dama <- ip_F(dama)
dama <- ped_maternal(dama, value_from = "Fi", name_to = "Fdam")
tail(dama)

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