% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/indices.R
\name{RYP}
\alias{RYP}
\title{Relative yield per plant (RYP)}
\usage{
RYP(
  dat,
  colIDstand = "ID",
  colIDfocal = "focal",
  colProp = "prop",
  colY = "yield"
)
}
\arguments{
\item{dat}{data.frame with one yield value per row and with at least four columns: the identifier of each stand, the identifier of the focal genotype or species in each stand, the sowing (plant) proportion of the focal in each stand, and the focal yield in each stand (see the example below); a stand with a single proportion equals to 1 will be interpreted as a monovarietal culture ("pure stand"), a mixture otherwise (and its proportions should sum to 1); note that contrary to \code{\link{RY}}, the proportions will be used to compute the values of RYP}

\item{colIDstand}{column name for the stand identifiers}

\item{colIDfocal}{column name for the focal identifiers}

\item{colProp}{column name for the proportions}

\item{colY}{column name for the yield values}
}
\value{
input data.frame with an extra column named "RYP"
}
\description{
Computes the relative yield per plant (RYP) as defined in Fowler (1982, \doi{10.2307/2259865}): RYP_ij = Y_ij / (p Y_i) where Y_ij is the yield of i when mixed with j at a proportion of p, and Y_i is the yield of i in monovarietal culture.
Note that, unfortunately, the equation of RYP was called "relative yield" (RY) in table 2 of Williams and McCarthy (2001, \doi{10.1046/j.1440-1703.2001.00368.x}), although these authors do have the right equation, i.e., they only dropped the "per plant".
Missing values are forbidden.
}
\examples{
(dat <- data.frame(ID=c("geno1", "geno2", "mixg1g2", "mixg1g2"),
                   focal=c("geno1", "geno2", "geno1", "geno2"),
                   prop=c(1, 1, 0.5, 0.5),
                   yield=c(50, 40, 25, 22)))
RYP(dat)
}
\seealso{
\code{\link{RY}}, \code{\link{RYT}}, \code{\link{RYM}}
}
\author{
Timothee Flutre
}
