% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/indices.R
\name{RYM}
\alias{RYM}
\title{Relative yield of mixture (RYM)}
\usage{
RYM(
  dat,
  colIDstand = NULL,
  colIDcomps = "comps",
  colProps = NULL,
  colY = "yield",
  sep = "-",
  colOut = "RYM"
)
}
\arguments{
\item{dat}{data.frame with one yield value per row and with at least four columns: the identifier of each stand, the identifiers of the components of each stand (separated by a specific symbol in the case of mixtures), the sowing (plant) proportion of the components in each stand (separated by the same symbol in the case of mixtures, and the yield of each stand (see the example below); a stand with a single component should have its proportion equal to 1 and will be interpreted as a monovarietal culture ("pure stand"), a mixture otherwise (and its proportions should sum to 1)}

\item{colIDstand}{column name for the stand identifiers (they should be unique); if NULL, the code will attempt to use \code{"colIDcomps"}}

\item{colIDcomps}{column name for the identifiers of the stand components (separated by \code{sep})}

\item{colProps}{column name for the stand proportions (separated by \code{sep} and summing to 1); if NULL, the code will assume all components of a given mixture are equiprobable}

\item{colY}{column name for the yield values}

\item{sep}{separator}

\item{colOut}{column name for the output RYM}
}
\value{
input data.frame with an extra column named from \code{"colOut"}
}
\description{
Computes the "relative yield of mixture" (RYM) as defined initially by Wilson (1988, \doi{10.2307/2403626}) for binary mixtures sowed in equal proportions, and extended by Williams and McCarthy (2001, \doi{10.1046/j.1440-1703.2001.00368.x}) to binary mixtures of unequal proportions.
A RYM above 1 means that the mixture yielded better than the sum of the pure-stand yields, each weighted by their proportion in the mixture.
It corresponds to equation 35 in Weigelt and Jolliffe (2003, \doi{10.1046/j.1365-2745.2003.00805.x}), as well as equation 25b (and not to 25a!) of the same paper where the "control" treatment is the expected mixture yield calculated based on the weighted component monovarietal yields.
Note that the RYM was unfortunately called "relative yield" (RY) by Reiss and Drinkwater (2018, \doi{10.1002/eap.1629}).
Missing values are forbidden.
}
\examples{
(dat <- data.frame(ID=c("geno1", "geno2", "mixg1g2"),
                   comps=c("geno1", "geno2", "geno1-geno2"),
                   props=c("1", "1", "0.6-0.4"),
                   yield=c(50, 40, 47)))
RYM(dat)
}
\seealso{
\code{\link{estimRYMRep}}, \code{\link{RYP}}, \code{\link{RY}}, \code{\link{RYT}}
}
