Learn R Programming

dmm (version 2.1-3)

warcolak.convert: Convert warcolak data file to format required for a dataframe for dmm() or mdf().

Description

A simple function to relabel the columns of the warcolak dataset from package nadiv, to comply with the requirements of dmm() or mdf().

Usage

warcolak.convert(w)

Arguments

w

An object produced by the call data(warcolak) from package nadiv.

Value

A dataframe containing the following columns:

"Id"

Individual identifier

"SId"

Sire identifier

"DId"

Dam identifier

"Sex"

Coding for sex

"Trait1"

First trait phenotypic value

"Trait2"

Second trait phenotypic value

"t1_a"

First trait additive genetic effect

"t2_a"

Second trait additive genetic effect

"t2_s"

Second trait additive genetic sexlinked effect

"t1_d"

First trait dominance genetic effect

"t2_d"

Second trait dominance genetic effect

"t1_r"

First trait environmental effect

"t2_r"

Second trait environmental effect

Details

The warcolak dataset has columns named slightly differently from what dmm() requires, but is otherwise compatable. We use this function to do a simple conversion before using warcolak as test data for dmm().

See Also

Functions dmm(), mdf(). Package nadiv.

Examples

Run this code
# NOT RUN {
library(dmm)
data(warcolak)
warcolak.df <- warcolak.convert(warcolak)
str(warcolak.df)
rm(warcolak.df)
rm(warcolak)

# }

Run the code above in your browser using DataLab