diff --git a/DESCRIPTION b/DESCRIPTION index d5af4e4..25b8051 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -25,7 +25,6 @@ Imports: URL: https://ryanzomorrodi.github.io/sasquatch/, https://github.com/ryanzomorrodi/sasr Suggests: rmarkdown, - quarto, testthat (>= 3.0.0), curl VignetteBuilder: knitr diff --git a/R/install.R b/R/install.R index 71c9072..5253db6 100644 --- a/R/install.R +++ b/R/install.R @@ -116,7 +116,7 @@ configure_saspy <- function( config <- list( java = java_path, - iom_host = iom_host, + iomhost = iom_host, iomport = 8591, encoding = "utf-8", authkey = "oda" @@ -171,4 +171,25 @@ get_home_dir <- function() { home_dir <- regmatches(home_dir, regexpr("(.*?[/|\\\\]){3}", home_dir)) } sub("[/|\\\\]$", "", home_dir) -} \ No newline at end of file +} + +menu <- function(choices, title) { + nums <- seq_along(choices) + cat(title, "\n\n", sep = "") + + mapply( + FUN = function(choice, num) { + cat(num, ": ", choice, "\n", sep = "") + }, + choices, + nums + ) + cat("\n") + repeat { + selection <- readline("Selection: ") + if (selection %in% as.character(c(0, nums))) { + return(as.integer(selection)) + } + cat("Enter an item from the menu, or 0 to exit\n") + } +} diff --git a/vignettes/setting_up.qmd b/vignettes/setting_up.rmd similarity index 97% rename from vignettes/setting_up.qmd rename to vignettes/setting_up.rmd index 4d85e6b..3e1c87d 100644 --- a/vignettes/setting_up.qmd +++ b/vignettes/setting_up.rmd @@ -1,12 +1,9 @@ --- title: "Setting Up" -format: - html: - toc: true - html-math-method: mathjax +output: rmarkdown::html_vignette vignette: > %\VignetteIndexEntry{Setting Up} - %\VignetteEngine{quarto::html} + %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8} ---