mirror of
https://github.com/agdamsbo/FreesearchR.git
synced 2025-09-12 01:49:39 +02:00
25 lines
630 B
R
25 lines
630 B
R
|
#' Easily launch the FreesearchR app
|
||
|
#'
|
||
|
#' @description
|
||
|
#' All data.frames in the global environment will be accessible through the app.
|
||
|
#'
|
||
|
#' @param ... passed on to `shiny::runApp()`
|
||
|
#'
|
||
|
#' @returns shiny app
|
||
|
#' @export
|
||
|
#'
|
||
|
#' @examples
|
||
|
#' \dontrun{
|
||
|
#' data(mtcars)
|
||
|
#' shiny_FreesearchR(launch.browser = TRUE)
|
||
|
#' }
|
||
|
launch_FreesearchR <- function(...){
|
||
|
appDir <- system.file("apps", "FreesearchR", package = "FreesearchR")
|
||
|
if (appDir == "") {
|
||
|
stop("Could not find the app directory. Try re-installing `FreesearchR`.", call. = FALSE)
|
||
|
}
|
||
|
|
||
|
a <- shiny::runApp(appDir = paste0(appDir,"/app.R"), ...)
|
||
|
return(invisible(a))
|
||
|
}
|