- answer <- readline(paste0("The package 'shiny' must be installed to ",
- "launch the Rnaught web application.\nWould you like to install it? ",
- "[Y/n] "))
+ missing_pkgs <- c(missing_pkgs, "shiny")
+ }
+ if (!requireNamespace("bslib", quietly = TRUE)) {
+ missing_pkgs <- c(missing_pkgs, "bslib")
+ }
+ if (!requireNamespace("DT", quietly = TRUE)) {
+ missing_pkgs <- c(missing_pkgs, "DT")
+ }
+
+ # If any of the required packages are missing,
+ # prompt the user to install them.
+ if (length(missing_pkgs) > 0) {
+ cat("The following packages must be installed to run the",
+ "Rnaught web application:\n"
+ )
+ writeLines(missing_pkgs)
+ answer <- readline("Begin installation? [Y/n] ")