% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mixing_ability.R
\name{mkZinterspe}
\alias{mkZinterspe}
\title{Design matrices for DBV-SBV models in an inter-specific trial}
\usage{
mkZinterspe(df, genosPerSp, colIDfocal = "focal", colIDneighbors = "neighbors")
}
\arguments{
\item{df}{data frame with one row per sole-crop plot or two rows per binary intercrop plot, with a factor column corresponding to the focal identifiers ("DBV" a.k.a. "DGE" or "Pr") and a column corresponding to the "neighbor(s)" identifiers ("SBV" a.k.a. "IGE" or "As")}

\item{genosPerSp}{list of two components, one per species, each being a vector with the genotype identifiers of the given species (they will be sorted)}

\item{colIDfocal}{name of the column containing the identifiers of the focal genotypes}

\item{colIDneighbors}{name of the column containing the identifiers of the neighbour genotypes}
}
\value{
list of two components, one per species, each being a list of two matrices, the first for the DBVs and the second for the SBVs; the column names of these matrices correspond to the genotype identifiers after sorting
}
\description{
Makes the design matrices for direct and social breeding values per species when the trial includes binary intercrops and, possibly, sole crops.
}
\examples{
(dat <- data.frame(focal=c("wheat01", "pea02",
                           "wheat01", "pea01",
                           "wheat01"),
                   neighbors=c("pea02", "wheat01",
                               "pea01", "wheat01",
                               "wheat01"),
                   name=c("wheat01-pea02", "wheat01-pea02",
                          "wheat01-pea01", "wheat01-pea01",
                          "wheat01-wheat01"),
                   stand = c("inter", "inter", "inter", "inter", "sole"),
                   species = c("wheat", "pea", "wheat", "pea", "wheat")))
(out <- mkZinterspe(dat,
                    list("wheat"="wheat01",
                         "pea"=c("pea01","pea02"))))
}
\author{
Timothee Flutre
}
