Learn R Programming

PhysioIndexR (version 0.1.0)

all_indices: Computation of All Stress Indices at Once

Description

A convenience function that returns a data frame with 11 stress indices—Stress Tolerance (TOL), Stress Tolerance Index (STI), Stress Susceptibility Percentage Index (SSPI), Yield Index (YI), Yield Stability Index (YSI), Relative Stress Index (RSI), Mean Productivity (MP), Geometric Mean Productivity (GMP), Harmonic Mean (HM), Mean Relative Performance (MRP), and Percent Yield Reduction (PYR)—for the same given inputs (Lamba et al., 2023; doi:10.1038/s41598-023-37634-8).

Usage

all_indices(
  Gen,
  YN,
  YS,
  YMN = NULL,
  YMS = NULL,
  include_inputs = TRUE,
  name_vectors_by_gen = TRUE
)

Value

If include_inputs=TRUE, a list with YMN, YMS, and all data frame.

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.

YMN, YMS

Optional numeric scalars for environment means. If NULL, computed.

include_inputs

Logical; if TRUE returns a list with YMN, YMS, and all.

name_vectors_by_gen

Ignored; kept for backward compatibility.

References

Lamba, K., Kumar, M., Singh, V. et al. (2023). doi:10.1038/s41598-023-37634-8.

Examples

Run this code
out <- all_indices(
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