将大型ShinydaShashboard应用程序拆分为若干部分
我对将大型ShinydaShashboard应用程序拆分为若干部分,r,file,shiny,shinydashboard,R,File,Shiny,Shinydashboard,我对shinny和shinydashboard相当陌生。我的第一个应用程序已经发展到我想要将其重构成碎片的大小,如下所示: 这应该是一项相当简单的任务。但是,我找不到任何关于如何将我的应用程序拆分为多个文件的示例,我也不确定最好的方法是什么 到目前为止,我还无法让它工作:我尝试在每个部分中调用源代码(“myBody.R”)。您可以在不同的文件中包含一些UI代码,然后使用 source("file.R", local=TRUE)$value 你可以看到这篇文章的更多细节 看看@Shape在中的策
shinny
和shinydashboard
相当陌生。我的第一个应用程序已经发展到我想要将其重构成碎片的大小,如下所示:
这应该是一项相当简单的任务。但是,我找不到任何关于如何将我的应用程序拆分为多个文件的示例,我也不确定最好的方法是什么
到目前为止,我还无法让它工作:我尝试在每个部分中调用
源代码(“myBody.R”)
。您可以在不同的文件中包含一些UI代码,然后使用
source("file.R", local=TRUE)$value
你可以看到这篇文章的更多细节
library(shiny)
source('sub_server_functions.R')
function(input, output, session) {
subServerFunction1(input, output, session)
subServerFunction2(input, output, session)
subServerFunction3(input, output, session)
}
其他想法包括:
.Rmd
文件的一个示例在这之后看起来很薄
---
title: "screenR"
output: flexdashboard::flex_dashboard
runtime: shiny
---
```{r}
# include the module
source("screenrdata.R")
```
Charts
======
### Screening Scatter
```{r}
# call the module
xyUI("id1")
callModule(screenchart, "id1")
```
你试图做的是有意义的,所以错误一定在细节中。请分享一个具体的代码示例。
---
title: "screenR"
output: flexdashboard::flex_dashboard
runtime: shiny
---
```{r}
# include the module
source("screenrdata.R")
```
Charts
======
### Screening Scatter
```{r}
# call the module
xyUI("id1")
callModule(screenchart, "id1")
```