Learn R Programming

lmDiallel (version 1.0.1)

expand.diallel: Create a Data Frame from All Combinations of Parentals

Description

This is a modification of the 'expand.grid()' function working specifically with diallel experiments. It creates a data frame from all combinations of the supplied vector of parents, depending on the mating scheme.

Usage

expand.diallel(pars, mating = 1)

Value

returns a data.frame object

Arguments

pars

pars a vector of parentals

mating

The type of mating scheme. 1: full diallel experiment; 2: no reciprocals; 3: no selfs; 4: no reciprocals and no selfs

Author

Andrea Onofri, Niccolo' Terzaroli, Luigi Russi

References

Onofri, A., Terzaroli, N. & Russi, L. Linear models for diallel crosses: a review with R functions. Theor Appl Genet (2020). https://doi.org/10.1007/s00122-020-03716-8

Examples

Run this code
pars <- LETTERS[1:4]
expand.diallel(pars, mating = 3)

Run the code above in your browser using DataLab