Last active
May 3, 2018 20:28
-
-
Save denisdbell/ccad016a5eef1348c3737d21fbbcb095 to your computer and use it in GitHub Desktop.
This file is used to execute a shiny application
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
################################### | |
#### Initializer For Shiny App #### | |
################################### | |
#Add shiny library | |
library("shiny") | |
#Retrieve command line arguments | |
args = commandArgs(trailingOnly=TRUE) | |
if (length(args)==0) { | |
args[1]="/<default shiny project path>/" | |
} | |
#Print working directory(Mostly for debugging) | |
print(args[1]) | |
#Set the working directory | |
setwd(args[1]) | |
#Run the shiny application on port 1234 | |
runApp(port = 1234) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment