简体   繁体   中英

Rungithub() - shiny app that contains ui.R and server.R in the same R file

I know that if the application will contain 2 separate files: ui.R and server.R, I could run:

library(shiny)    
shiny::runGitHub('username/repo_name')

Now, is it possible to run a shiny application hosted in Github which contains the ui and server in only one R file? For example:

library(shiny)    
shiny::runGitHub('manolo20/shinytreemap')

Thank you.

According to the error message you get from shiny::runGitHub('manolo20/shinytreemap')

Error in shinyAppDir(x) : App dir must contain either app.R or server.R.

the anser is yes. you just need to use the name app.R for the R file containing the app. Also, this file must be at the top level of the repository unless you use the subdir argument.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM