Learn R Programming

PhysioIndexR (version 0.1.0)

HM: Harmonic Mean (HM)

Description

This function computes Harmonic Mean (HM) using any traits (like yield) under stress and non-stress conditions. The lower values of HM indicates greater tolerance. For more details see Bidinger et al. (1987) doi:10.1071/AR9870037.

Usage

HM(Gen, YN, YS)

Value

A data frame with Gen, HM.

$$HM = \frac{2 \times YN \times YS}{YN + YS}$$

Arguments

Gen

Character vector of genotype identifiers.

YN

Numeric vector: yield (any trait) under non-stress (normal) environment.

YS

Numeric vector: yield (any trait) under stress environment.

References

Bidinger, F.R., Mahalakshmi, V. and Rao, G.D.P. (1987). doi:10.1071/AR9870037.

Examples

Run this code
out = HM(
Gen=c("G1","G2","G3"),
YN=c(10,8,5),
YS=c(7,5,3)
)
print(out)

Run the code above in your browser using DataLab