Embedding multiple brilliant applications in a single Rmarkdown file using the "shinyAppDir" function

I have created some brilliant applications to paste into a single Rmarkdown file. I am using an Amazon ec2 Ubuntu machine to host my brilliant applications and rstudio. All working applications are on the server / srv / shiny -server.

To do this, I create another folder for one Rmarkdown file in / srv / shiny -server. Individual pieces are executed, but the Run Document command gives an error:

ERROR: cannot open connection

I am using the following R code :

### App 1 goes here
    ```{r, echo=FALSE}
library(shiny)
shinyAppDir(
  "/srv/shiny-server/App1",
  options=list(
    width="100%", height=550
  )
)
```
### App 2 goes here
    ```{r, echo=FALSE}
library(shiny)
shinyAppDir(
  "/srv/shiny-server/App2",
  options=list(
    width="100%", height=550
  )
)
```
## Likewise ...
+4
source share
1 answer

, , , . Ubuntu EC2. , , , R Markdown, ggvis :

---
date: "`r format(Sys.time(), '%d %B, %Y')`"
output:
  html_document:
    theme: readable
    toc: yes
    toc_depth: 3
runtime: shiny
---

, :

  • . , Rmd.
  • cache = TRUE .

, , " ".

+1

Source: https://habr.com/ru/post/1598748/


All Articles