| Title: | Physiological and Stress Indices for Crop Evaluation |
| Version: | 0.1.0 |
| Maintainer: | Vinayaka <vinayaka.b3vs@gmail.com> |
| Description: | Crop production systems are increasingly challenged by climate variability, resource limitations, and biotic–abiotic stresses. In this context, stress tolerance indices and physiological trait estimators are essential tools to identify stable and superior genotypes, quantify yield stability under stress versus non-stress conditions, and understand plant adaptive responses. The 'PhysioIndexR' package provides a unified framework to compute commonly used stress indices, physiological traits, and derived metrics that are critical in crop improvement, crop physiology, and other agricultural sciences. The package includes functions to calculate classical stress tolerance indices (See Lamba et al., 2023; <doi:10.1038/s41598-023-37634-8>) such as 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), along with a convenience wrapper all_indices() that returns all indices simultaneously. The function mfvst_from_indices() integrates these indices into a composite stress score using direction-aware membership values (0–1 scaling) and also averaging, facilitating genotype ranking and selection (See Vinu et al., 2025; <doi:10.1007/s12355-025-01595-1>). The package also implements two novel composite functions: WMFVST(), which computes the Weighted Mean Membership Function Value for Stress Tolerance, and WASI(), which computes the Weighted Average Stress Index, both derived from membership function values (MFV) and raw stress index values, respectively. Beyond stress indices, the package provides functions for key physiological traits relevant to sugarcane and other crops: bmap() computes biomass accumulation and partitioning between leaf, cane/shoot, and root fractions. chl() estimates total chlorophyll content from Soil-Plant Analysis Development (SPAD) and Chlorophyll Content Index (CCI) values using validated quadratic models particularly for sugarcane (See Krishnapriya et al., 2020; <doi:10.37580/JSR.2019.2.9.150-163>). ctd() calculates canopy temperature depression (CTD) from ambient and canopy temperatures, an important indicator of transpiration efficiency. growth() computes key growth analysis parameters, including Leaf Area Index (LAI), Net Assimilation Rate (NAR), and Crop Growth Rate (CGR) across crop growth stages (See Watson, 1958; <doi:10.1093/oxfordjournals.aob.a083596>). ranking() provides flexible ranking utilities for genotype performance with multiple tie-handling and NA-placement options. Through these tools, the package enables researchers to: (i) quantify crop responses to stress environments, (ii) partition physiological components of yield, (iii) integrate multiple indices into composite metrics for genotype evaluation, and (iv) facilitate informed decision making in breeding pipelines, and plant physiology experiments. By combining physiology-based traits with quantitative stress indices, 'PhysioIndexR' supports comprehensive crop evaluation and helps researchers identify multi-stress-resilient superior genotypes, thereby contributing to genetic improvement and ensuring sustainable production of food, fuel, and fibre in the era of limited resources and climate change. |
| Imports: | stats |
| License: | GPL-3 |
| Encoding: | UTF-8 |
| Depends: | R (≥ 4.1) |
| RoxygenNote: | 7.3.3 |
| NeedsCompilation: | no |
| Packaged: | 2025-11-08 06:32:30 UTC; user |
| Author: | Vinayaka |
| Repository: | CRAN |
| Date/Publication: | 2025-11-12 10:50:01 UTC |
Chlorophyll concentration from non-destructive indices (Chl)
Description
This function computes total chlorophyll content derived from SPAD (Soil-Plant Analysis Development) value (TCHLSPAD), and total chlorophyll content derived from CCI (Chlorophyll Content Index) value (TCHLCCI). For more details see Krishnapriya et al. (2020) doi:10.37580/JSR.2019.2.9.150-163.
Usage
Chl(Gen, SPAD_PI, CCI_PI)
Arguments
Gen |
Character vector of Genotype IDs. |
SPAD_PI |
Numeric vector of SPAD (Soil-Plant Analysis Development) values for phase I (PI). |
CCI_PI |
Numeric vector of CCI (Chlorophyll Content Index) values for phase I (PI). |
Value
A list of output columns:
-
Gen: Character vector of genotype IDs. -
TCHLSPAD: total chlorophyll content derived from SPAD (Soil-Plant Analysis Development) value (TCHLSPAD). -
TCHLCCI: total chlorophyll content derived from CCI (Chlorophyll Content Index) value (TCHLCCI).
References
Krishnapriya, V., Arunkumar, R., Gomathi, R. and Vasantha, S. (2020). doi:10.37580/JSR.2019.2.9.150-163.
Examples
# Creating a sample dataset
Gen = c("V1","V2","V3")
SPAD_PI = c(43.1,44.6,38.6)
CCI_PI = c(27.3,30.4,21.3)
Chl(Gen, SPAD_PI, CCI_PI)
Geometric Mean Productivity (GMP)
Description
This function computes Geometric Mean Productivity (GMP) using any traits (like yield) under stress and non-stress conditions. The lower values of GMP indicates greater tolerance. For more details see Fernandez (1992).
Usage
GMP(Gen, 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. |
Value
A data frame with Gen, GMP.
GMP = \sqrt{YN \times YS}
References
Fernandez, G.C.J. (1992). Effective selection criteria for assessing plant stress tolerance. In: Proceedings of the international symposium on adaptation of vegetables and other food crops in temperature and water stress. AVRDC Publication: Tainan, Taiwan: Shanhua: Chapter (25), 257–270.
Examples
out=GMP(
Gen=c("G1","G2","G3"),
YN=c(10,8,5),
YS=c(7,5,3)
)
print(out)
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)
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. |
Value
A data frame with Gen, HM.
HM = \frac{2 \times YN \times YS}{YN + YS}
References
Bidinger, F.R., Mahalakshmi, V. and Rao, G.D.P. (1987). doi:10.1071/AR9870037.
Examples
out = HM(
Gen=c("G1","G2","G3"),
YN=c(10,8,5),
YS=c(7,5,3)
)
print(out)
Mean Productivity (MP)
Description
This function computes Mean Productivity (MP) using any traits (like yield) under stress and non-stress conditions. The lower values of MP indicates greater tolerance. For more details see Rosielle and Hamblin (1981) doi:10.2135/cropsci1981.0011183X002100060033x.
Usage
MP(Gen, 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. |
Value
A data frame with Gen, MP.
MP = \frac{YN + YS}{2}
References
Rosielle, A.A. and Hamblin, J. (1981). <10.2135/cropsci1981.0011183X002100060033x>.
Examples
out = MP(
Gen=c("G1","G2","G3"),
YN=c(10,8,5),
YS=c(7,5,3)
)
print(out)
Mean Relative Performance (MRP)
Description
This function computes Mean Relative Performance (MRP) using any traits (like yield) under stress and non-stress conditions. The lower values of MRP indicates greater tolerance. For more details see Ramirez-Vallejo and Kelly (1998) doi:10.1023/A:1018353200015.
Usage
MRP(Gen, YN, YS, YMN = NULL, YMS = NULL)
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 |
Optional numeric scalar: mean of |
YMS |
Optional numeric scalar: mean of |
Value
A list with YMN, YMS, and Result (data frame with Gen, MRP).
MRP = \left(\frac{YS}{YMS}\right) + \left(\frac{YN}{YMN}\right)
References
Ramirez-Vallejo, P. and Kelly, J.D. (1998). doi:10.1023/A:1018353200015.
Examples
out = MRP(
Gen=c("G1","G2","G3"),
YN=c(10,8,5),
YS=c(7,5,3)
)
print(out)
Percent Yield Reduction (PYR)
Description
This function computes Percent Yield Reduction (PYR) using any traits (like yield) under stress and non-stress conditions. The lower values of PYR indicates greater tolerance. For more details see Farshadfar and Javadinia (2011).
Usage
PYR(Gen, 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. |
Value
A data frame with Gen, PYR.
PYR = \frac{(YN - YS)}{YN} \times 100
References
Farshadfar, E. and Javadinia, J. (2011). Evaluation of chickpea (Cicer arietinum L.) genotypes for drought tolerance. Seed and Plant Improvement Journal, 27(4), 517–537.
Examples
out = PYR(
Gen=c("G1","G2","G3"),
YN=c(10,8,5),
YS=c(7,5,3)
)
print(out)
Relative Stress Index (RSI)
Description
This function computes Relative Stress Index (RSI) using any traits (like yield) under stress and non-stress conditions. The lower values of RSI indicates greater tolerance. For more details see Fischer and Wood (1979) doi:10.1071/AR9791001.
Usage
RSI(Gen, YN, YS, YMN = NULL, YMS = NULL)
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 |
Optional numeric scalar: mean of |
YMS |
Optional numeric scalar: mean of |
Value
A list with YMN, YMS, and Result (data frame with Gen, RSI).
RSI = \frac{(YN/YS)}{(YMS/YMN)}
References
Fischer, R.A. and Wood, J.T. (1979). Drought resistance in spring wheat cultivars. III.* Yield associations with morpho-physiological traits. Australian Journal of Agricultural Research, 30(6), 1001-1020.
Examples
out = RSI(
Gen=c("G1","G2","G3"),
YN=c(10,8,5),
YS=c(7,5,3)
)
print(out)
Stress Susceptibility Percentage Index (SSPI)
Description
This function computes Stress Susceptibility Percentage Index (SSPI) using any traits (like yield) under stress and non-stress conditions. The lower values of SSPI indicates greater tolerance. For more details see Moosavi et al. (2008).
Usage
SSPI(Gen, YN, YS, YMN = NULL)
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 |
Optional numeric scalar: mean of |
Value
A list with YMN and Result (data frame with Gen, SSPI).
SSPI = \frac{(YN - YS)}{2 \times YMN} \times 100
References
Mousavi, S.S., YAZDI, S.B., Naghavi, M.R., Zali, A.A., Dashti, H. and Pourshahbazi, A. (2008). Introduction of new indices to identify relative drought tolerance and resistance in wheat genotypes. Desert 12, 165–178.
Examples
out=SSPI(Gen=c("G1","G2","G3"), YN=c(10,8,5), YS=c(7,5,3))
print(out)
Stress Tolerance Index (STI)
Description
This function computes stress tolerance index (STI) using any traits (like yield) under stress and non-stress conditions. The lower values of STI indicates greater tolerance. For more details see Fernandez (1992).
Usage
STI(Gen, YN, YS, YMN = NULL)
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 |
Optional numeric scalar: mean of |
Value
A list of components:
-
YMN: Mean of yield (any trait) values under normal condition -
Result: It includes-
Gen: Character vector of genotype IDs. -
STI: Estimated stress tolerance index (STI) values for respective genotypes.
-
STI = \frac{YN \times YS}{(YMN)^2}
References
Fernandez, G.C.J. (1992). Effective selection criteria for assessing plant stress tolerance. In: Proceedings of the international symposium on adaptation of vegetables and other food crops in temperature and water stress. AVRDC Publication: Tainan, Taiwan: Shanhua: Chapter (25), 257–270.
Examples
out=STI(Gen=c("G1","G2","G3"), YN=c(10,8,5), YS=c(7,5,3))
print(out)
Stress Tolerance (TOL)
Description
This function computes stress tolerance (TOL) using any traits like yield under stress and non-stress conditions. The lower values of TOL indicates greater tolerance. For more details see Rosielle and Hamblin (1981) doi:10.2135/cropsci1981.0011183X002100060033x.
Usage
TOL(Gen, 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. |
Value
A list of output columns:
-
Gen: Character vector of genotype IDs. -
TOL: Estimated stress tolerance (TOL) values for respective genotypes.
TOL = YN - YS
References
Rosielle, A.A. and Hamblin, J. (1981). doi:10.2135/cropsci1981.0011183X002100060033x.
Examples
TOL(Gen=c("G1","G2","G3"), YN=c(10,8,5), YS=c(7,5,3))
Weighted Average Stress Index (WASI)
Description
A composite measure that computes the weighted mean for each genotype across multiple stress indices, accounting for whether higher or lower values are better.
Usage
WASI(data, decimals = 5)
Arguments
data |
A data frame containing genotype IDs ( |
decimals |
Integer; number of decimal places to use for Excel-style data.
All indices are rounded to this precision before ranking and again for the
index × rank products (default |
Details
The Weighted Average Stress Index for genotype i is
WASI_i = \frac{\sum_{j=1}^{k} (X_{ij} \times R_{ij})}{\sum_{j=1}^{k} R_{ij}},
where X_{ij} is the value of genotype i for index j, and R_{ij}
is its rank, determined by whether higher or lower values are favorable.
Ranks use Excel-like behavior (ties.method = "min"). Indices are rounded to
decimals places prior to ranking and multiplication to better match Excel-style
calculations.
Value
A data frame with Gen and its computed WASI (sorted in descending order).
Examples
df <- data.frame(
Gen = paste0("G", 1:5),
GMP = c(1:5),
HM = c(6:10),
MP = c(11:15),
MRP = c(16:20),
PYR = c(21:25),
RSI = c(26:30),
SSPI = c(31:35),
STI = c(0.1, 0.2, 0.3, 0.4, 0.5),
TOL = c(41:45),
YI = c(0.6, 0.7, 0.8, 0.9, 1.0),
YSI = c(0.2, 0.3, 0.4, 0.5, 0.6)
)
WASI(df)
Weighted Mean Membership Function Value for Stress Tolerance (WMFVST)
Description
Its a composite measure which computes the weighted mean of MFVST values (0–1 range) for each genotype across multiple stress indices, considering whether higher or lower values are better.
Usage
WMFVST(data)
Arguments
data |
A data frame containing genotype IDs (Gen) and MFVST values for the indices (GMP, HM, MP, MRP, PYR, RSI, SSPI, STI, TOL, YI, YSI), each within the range of 0 to 1. |
Details
The Weighted Mean MFVST for genotype i is:
WMFVST_i = \frac{\sum_{j=1}^{k} (MFVST_{ij} \times R_{ij})}
{\sum_{j=1}^{k} R_{ij}}
where MFVST_{ij} is the MFVST value of genotype i for index j, and
R_{ij} is its rank, determined by whether higher or lower values are favorable.
Value
A data frame with Gen and its Weighted Mean MFVST (WMFVST).
Examples
set.seed(123)
df <- data.frame(
Gen = paste0("G", 1:5),
GMP = runif(5),
HM = runif(5),
MP = runif(5),
MRP = runif(5),
PYR = runif(5),
RSI = runif(5),
SSPI = runif(5),
STI = runif(5),
TOL = runif(5),
YI = runif(5),
YSI = runif(5)
)
WMFVST(df)
Yield Index (YI)
Description
This function computes Yield Index (YI) using any traits (like yield) under stress and non-stress conditions. The lower values of YI indicates greater tolerance. For more details see Gavuzzi et al. (1997) doi:10.4141/P96-130.
Usage
YI(Gen, YS, YMS = NULL)
Arguments
Gen |
Character vector of genotype identifiers. |
YS |
Numeric vector: yield (any trait) under stress environment. |
YMS |
Optional numeric scalar: mean of |
Value
A list with YMS and Result (data frame with Gen, YI).
YI = \frac{YS}{YMS}
References
Gavuzzi, P., Rizza, F., Palumbo, M., Campanile, R.G., Ricciardi, G.L. and Borghi, B. (1997). Evaluation of field and laboratory predictors of drought and heat tolerance in winter cereals. Canadian Journal of Plant Science, 77(4), 523-531.
Examples
out = YI(Gen=c("G1","G2","G3"), YS=c(7,5,3))
print(out)
Yield Stability Index (YSI)
Description
This function computes Yield Stability Index (YSI) using any traits (like yield) under stress and non-stress conditions. The lower values of YSI indicates greater tolerance. For more details see Bouslama and Schapaugh (1984) doi:10.2135/cropsci1984.0011183X002400050026x.
Usage
YSI(Gen, 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. |
Value
A data frame with columns Gen, YSI.
YSI = \frac{YS}{YN}
References
Bouslama, M. and Schapaugh Jr, W.T. (1984). doi:10.2135/cropsci1984.0011183X002400050026x.
Examples
out = YSI(Gen=c("G1","G2","G3"), YN=c(10,8,5), YS=c(7,5,3))
print(out)
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
)
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 |
name_vectors_by_gen |
Ignored; kept for backward compatibility. |
Value
If include_inputs=TRUE, a list with YMN, YMS, and all data frame.
References
Lamba, K., Kumar, M., Singh, V. et al. (2023). doi:10.1038/s41598-023-37634-8.
Examples
out <- all_indices(
Gen=c("G1","G2","G3"),
YN=c(10,8,5), YS=c(7,5,3)
)
print(out)
Biomass Accumulation and Partitioning (bmap)
Description
This function computes total above-ground biomass (TBM), root:shoot ratios, and biomass partitioning to leaf and cane/crop yield across stages/phases PI–PIII. For more details see Krishnapriya et al. (2020) doi:10.37580/JSR.2019.2.9.150-163. Here observations are recorded on the variables-Plant height (PH), Root length (RL), Leaf dry weight (LDW), Cane dry weight (CDW), and Root dry weight (RDW) at the distinct time interval (number of days between observations recorded) phases (PI-PIII)
Usage
bmap(data)
Arguments
data |
A data frame with column:
|
Value
A list of result columns:
-
Gen: Character vector of genotype IDs. -
TBM_PI, TBM_PII, TBM_PIII: Total above-ground biomass for three distinct phases I-III (PI-PIII). -
BPL_PI, BPL_PII, BPL_PIII: Biomass partitioning to leaf for three distinct phases I-III (PI-PIII). -
BPC_PI, BPC_PII, BPC_PIII: Biomass partitioning to cane (crop) for three distinct phases I-III (PI-PIII). -
RSRDW: Root-to-shoot ratio based on dry weight -
RSRL: Root-to-shoot ratio based on length
References
Krishnapriya, V., Arunkumar, R., Gomathi, R. and Vasantha, S. (2020). doi:10.37580/JSR.2019.2.9.150-163.
Examples
# Creating a sample dataset
df <- data.frame(
Gen = c("V1","V2","V3"),
PH_PI = c(161.0,144.0,158.0),
PH_PII = c(212.0,189.0,200.0),
PH_PIII= c(243.0,223.0,240.0),
RL_PI = c(98.2,83.5,72.7),
LDW_PI = c(83.9,136.1,137.6),
CDW_PI = c(36.1,55.9,57.3),
RDW_PI = c(17.7,19.2,12.4),
LDW_PII= c(138.5,193.2,183.0),
CDW_PII= c(76.2,136.4,145.0),
LDW_PIII=c(292.2,386.5,450.1),
CDW_PIII=c(190.4,336.8,323.4)
)
bmap(df)
Canopy Temperature Depression (CTD)
Description
This function computes canopy temperature depression (CTD). For more details see Watson (1958) doi:10.1093/oxfordjournals.aob.a083596.
Usage
ctd(Gen, amb.temp, CT_PI)
Arguments
Gen |
Character vector of genotype IDs. |
amb.temp |
Numeric scalar; ambient temperature (°C) (user must define this input). |
CT_PI |
Numeric vector; canopy temperature (°C) at phase I (PI). |
Value
A list of output columns:
-
Gen: Character vector of genotype IDs. -
CTD: Canopy temperature depression (CTD) values for respective genotypes.
References
Watson, D.J. (1958). doi:10.1093/oxfordjournals.aob.a083596.
Examples
# Creating a sample dataset
df <- data.frame(
Gen = c("V1","V2","V3"),
CT_PI = c(26.7,31.4,28.4)
)
ctd(df$Gen, amb.temp = 34.2, CT_PI = df$CT_PI)
Growth Indices
Description
This function computes genotype (Gen) wise growth indices-leaf area index (LAI), net assimilation rate (NAR), and crop growth rate (CGR) for time intervals between distinct stages/phases (days). For more details see Williams (1946), and Watson (1958) doi:10.1093/oxfordjournals.aob.a083596.
Usage
growth(data, gr.area, t.interval1, t.interval2)
Arguments
data |
Data frame with input columns:
|
gr.area |
Ground area occupied by the sample (cm^2 or m^2, same unit as that of leaf area) (user must define this input). |
t.interval1 |
Time interval (days) between consecutive sampling phases PI and PII (user must define this input). |
t.interval2 |
Time interval (days) between consecutive sampling phases PII and PIII (user must define this input). |
Value
A list of result components:
-
Gen: Character vector of genotype IDs. -
LAI_PI, LAI_PII, LAI_PIII): Leaf Area Index (LAI) for three distinct phases I-III (PI-PIII). -
NAR_PII, NAR_PIII: Net Assimilation Rate (NAR) for two consecutive sampling intervals (PI–PII) and (PII–PIII). -
CGR_PII, CGR_PIII: Crop Growth Rate (CGR) for two consecutive sampling intervals (PI–PII) and (PII–PIII).
References
Williams, R.F. (1946). The physiology of plant growth with special reference to the concept of net assimilation rate. Annals of Botany, 10(37), 41-72.
Watson, D.J. (1958). doi:10.1093/oxfordjournals.aob.a083596.
Examples
# Creating a sample dataset
df <- data.frame(
Gen = c("V1","V2","V3"),
LA_PI = c(599.4,544.4,573.2),
LA_PII = c(1533.4,1088.0,1633.1),
LA_PIII= c(1111.2,866.0,1181.0),
LDW_PI = c(83.9,136.1,137.6),
CDW_PI = c(36.1,55.9,57.3),
LDW_PII= c(138.5,193.2,183.0),
CDW_PII= c(76.2,136.4,145.0),
LDW_PIII=c(292.2,386.5,450.1),
CDW_PIII=c(190.4,336.8,323.4)
)
growth(df, gr.area = 250, t.interval1 = 30, t.interval2 = 60)
Membership Function Value for Stress Tolerance (MFVST)
Description
This function computes membership function scores (0..1) for each available index column using min–max scaling with direction awareness, then aggregates them into a simple average MFVST. For more details see Vinu et al. (2025) doi:10.1007/s12355-025-01595-1.
Usage
mfvst_from_indices(
df,
gen_col = "Gen",
lower_better = c("TOL", "SSPI", "RSI", "PYR"),
higher_better = c("STI", "YI", "YSI", "MP", "GMP", "HM", "MRP"),
weights = NULL,
robust = FALSE,
probs = c(0.01, 0.99)
)
Arguments
df |
A data frame containing the stress indices (e.g., from |
gen_col |
Name of genotype column; if present, it is included in the output. |
lower_better |
Character vector listing indices where a lower value is preferred. |
higher_better |
Character vector listing indices where a higher value is preferred. |
weights |
Optional named numeric vector of weights for indices. |
robust |
Logical; if |
probs |
Two-element numeric vector of quantiles for robust winsorization. |
Value
A list with $MFVST_indexwise: a data frame that contains per-index
membership columns (suffix "_M") and the average MFVST, that is, Mean_MFVST.
References
Vinu, V., Lakshmi Pathy, T., Mahadeva Swamy, H.K. et al. (2025). doi:10.1007/s12355-025-01595-1.
Examples
df <- all_indices(
Gen=c("G1","G2","G3"),
YN=c(10,8,5),
YS=c(7,5,3)
)
df1 <- as.data.frame(df$all)
mfvst <- mfvst_from_indices(df1)
print(mfvst)
Flexible Ranking Utility
Description
A thin wrapper around base rank with support for
ascending/descending order, multiple tie strategies, NA placement,
and dense ranks.
Usage
ranking(
v,
direction = c("asc", "desc"),
ties = c("average", "min", "max", "first", "random"),
na.last = c("keep", "bottom", "top"),
dense = FALSE
)
Arguments
v |
Numeric (or coercible) vector to rank. |
direction |
Character, one of |
ties |
Character, tie-breaking: one of
|
na.last |
Character, placement of NAs: |
dense |
Logical; if |
Value
An integer/numeric vector of ranks, same length as v.
Examples
ranking(c(3, 3, 2, NA, 5), direction="asc", ties="min", na.last="bottom")
ranking(c(3, 3, 2, 5), direction = "desc", dense = TRUE)
Gen=c("G1","G2","G3")
YN=c(10,8,5)
YS=c(7,5,3)
a=STI(Gen, YN, YS) # for instance STI taken here.
out=data.frame(a$Result$Gen, a$Result$STI,
ranking(a$Result$STI, direction="desc")
)
print(out)