% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/starchSDI.R
\name{starchSDI}
\alias{starchSDI}
\title{Starch-Based Slow Digestibility Index}
\usage{
starchSDI(starchData)
}
\arguments{
\item{starchData}{A data frame or object coercible to a data frame. The first
column must contain candidate names. The remaining numeric columns must
follow this sequence: TS \%, Aratio, TAC\%, TAPC\%, RDS \%, SDS\%, RS\%.}
}
\value{
A data frame with:
\describe{
\item{Score}{TOPSIS score}
\item{Rank}{Rank}
}
}
\description{
Starch-Based Slow Digestibility Index
}
\details{
This function uses a fixed weight vector and criterion type for
starch-related variables. Benefit criteria are marked with \code{+} and cost
criteria are marked with \code{-}.
}
\examples{
\donttest{
simulate_new_crop_data <- function(n_rep = 20, seed = 123) {
crop_names <- c("Sample 1", "Sample 2", "Sample 3", "Sample 4", "Sample 5")
sim_one_crop <- function(crop, n) {
data.frame(
     Crop = rep(crop, n),
     `TS \%` = runif(n, 40, 80),
     Aratio = runif(n, 0.30, 2.50),
     `TAC\%` = runif(n, 20, 35),
     `TAPC\%` = runif(n, 10, 60),
     `RDS \%` = runif(n, 35, 75),
     `SDS\%` = runif(n, 5, 25),
     `RS\%` = runif(n, 10, 45),
     check.names = FALSE
   )
 }
 simulated_data <- do.call(
   rbind,
   lapply(crop_names, sim_one_crop, n = n_rep)
 )
 numeric_cols <- setdiff(names(simulated_data), "Crop")
 simulated_data[numeric_cols] <- round(simulated_data[numeric_cols], 3)
  rownames(simulated_data) <- NULL
  simulated_data
}
Data <- simulate_new_crop_data(n_rep = 1, seed = 123)
starchSDI(Data)
}

}
\references{
Pandey, S., Goswami, D., Vinutha, T., Goswami, S., Kumar, R. R., Singh, S. P., Rudra, S. G., Singh, M. K., Satyavathi, T., Girija, A., Thandapilly, S. J., & Krishnan, V. (2026). Molecular and microstructural cues for starch digestive heterogeneity in Indian pearl millet (Pennisetum glaucum). Journal of Functional Foods, 138, 107208. https://doi.org/10.1016/j.jff.2026.107208.
}
