R/prompt_install.R

Defines functions prompt_install

prompt_install <- function(package) {

  to_install <-
    utils::menu(choices = c("yes", "no"),
                title = paste("A suitable version of package",
                              paste0("{",package,"}"),
                              "was not found. Would you like to install now?"))

  if (to_install == 1) TRUE else FALSE

}
anthonynorth/using documentation built on July 26, 2020, 8:24 a.m.