Skip to content

Instantly share code, notes, and snippets.

@cannin
Last active August 29, 2015 14:11
Show Gist options
  • Save cannin/c78097528a2d2f34bdea to your computer and use it in GitHub Desktop.
Save cannin/c78097528a2d2f34bdea to your computer and use it in GitHub Desktop.
Deploys a R Shiny app, but first copies the RData from the data folder
if (!require("devtools")) install.packages("devtools")
library(devtools)
if (!require("shinyapps")) devtools::install_github("rstudio/shinyapps")
library(shinyapps)
# Set working directory to root directory of package
#setwd(TOP_LEVEL_PACKAGE_DIRECTORY)
# Copy data from data folder
file.copy(dir("data", full.names=TRUE), file.path("inst", "shinyApp", "www", "db"),
overwrite=TRUE, recursive=TRUE)
deployApp(file.path("inst", "shinyApp"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment