R/app_tools.R

Defines functions .onAttach runCWQkitr

Documented in runCWQkitr

.onAttach <- function(libname, pkgname) {
  packageStartupMessage("Although this software program has been used by the U.S. Geological Survey (USGS), no warranty, expressed or implied, is made by the USGS or the U.S. Government as to the accuracy and functioning of the program and related program material nor shall the fact of distribution constitute any such warranty, and no responsibility is assumed by the USGS in connection therewith.")
}

#' Start the CWQkitr app
#'
#' Launch the CWQkitrapp in a browser
#'
#' @export
#'

runCWQkitr <- function() {
  
  app_dir <- system.file("shiny", "cwqkitr-app", package = "CWQkitr")
  if(app_dir == "") {
    stop("Couldn't find app directory, try reinstalling the package")
  }
  
  shiny::runApp(app_dir, launch.browser = TRUE)
  
}
PatrickEslick/CWQkitr documentation built on Dec. 12, 2019, 12:55 a.m.