#' Launch Augmented Pooled RCBD Shiny Application
#'
#' Launches an interactive Shiny application for performing
#' augmented randomized complete block design analysis across
#' multiple environments.
#'
#' @return
#' An interactive Shiny application for augmented pooled RCBD analysis.
#'
#' @examples
#' if (interactive()) {
#'   augmentedPooledRCBD()
#' }
#'
#' @references
#' Federer, W. T. (1961). Augmented designs with one-way elimination
#' of heterogeneity. \emph{Biometrics}, 17(3), 447-473.
#' \doi{10.2307/2527837}
#'
#' Searle, S. R. (1965). \emph{Computing formulae for analyzing
#' augmented randomized complete block designs} (Technical Report
#' BU-207-M). Cornell University, Biometrics Unit.
#'
#' Maranna, S., Nataraj, V., Kumawat, G., Mehetre, S. P., Reddy, R.,
#' Jaybhay, S., P. G., S., Rathod, S., Agrawal, N., Rajesh, V., Kumar, S.,
#' Rajput, L. S., Talukdar, A., C., G., Chandra, S., Ratnaparkhe, M. B.,
#' Ramteke, R., Satpute, G. K., Gupta, S., & Singh, K. H. (2024).
#' Understanding of G × E interactions of yield attributes in soybean
#' MAGIC population and characterization for charcoal rot resistance.
#' \emph{Agronomy Journal}, 116(3), 1290-1301.
#' \doi{10.1002/agj2.21572}
#'
#' Malaquias, J. V., Amabile, R. F., Zorzo, F., Melo, J. V. P.,
#' & Fagioli, M. (2023). Analysis of variance in augmented block design
#' and Scott-Knott's test in hybrid corn selection studies.
#' \emph{Pesquisa Agropecuária Brasileira}, 58, e03023.
#' \doi{10.1590/S1678-3921.pab2022.v57.03023}
#'
#'
#' @importFrom shiny runApp
#' @importFrom shinybusy show_modal_spinner remove_modal_spinner
#' @importFrom DT DTOutput renderDT datatable formatRound
#' @export
augmentedPooledRCBD <- function() {

  appDir <- system.file(
    "shinyapp",
    package = "AugmentedPooledRCBD"
  )

  if (appDir == "") {
    stop(
      "Could not find `shinyapp`directory. Try re-installing `AugmentedPooledRCBD`.",
      call. = FALSE
    )
  }

  shiny::runApp(
    appDir,
    display.mode = "normal"
  )
}
