繁体   English   中英

Rungithub()-闪亮的应用程序,在同一R文件中包含ui.R和server.R

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

我知道,如果应用程序将包含2个单独的文件:ui.R和server.R,则可以运行:

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

现在,是否可以运行在Github中托管的闪亮应用程序,该应用程序仅在一个R文件中包含ui和服务器? 例如:

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

谢谢。

根据您从shiny::runGitHub('manolo20/shinytreemap')获得的错误消息

ShinyAppDir(x)中的错误:应用程序目录必须包含app.R或server.R。

答案是肯定的。 您只需要为包含该应用程序的R文件使用名称app.R 另外,除非您使用subdir参数,否则此文件必须位于存储库的顶层。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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