ped_maternal {purgeR} | R 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)
[Package purgeR version 1.8.2 Index]