I have interactive rmarkdown documents that I am trying to link. The problem is that I don’t know which ones are available, so I can’t hardlink the links through [doc](path/to/doc.Rmd). I cannot understand if it is possible to have a reactive list of documents from which I can create work links (so that they can be clicked and open another interactive document). Here are a couple of failed attempts:
Main.Rmd
---
runtime: shiny
---
[other](other.Rmd)
```{r}
vals <- reactiveValues(rmds="other.Rmd")
ui <- renderUI({
list(
selectInput("doc", "Document", vals$rmds),
actionButton("go", "Go")
)
})
ui
observeEvent(input$go, {
rmarkdown::run(input$doc)
})
```
```{r}
shinyApp(
shinyUI(
htmlOutput("links")
),
shinyServer(function(input, output, session) {
output$links <- renderUI({
tags$a(href=vals$rmds, vals$rmds)
})
})
)
```
Other.Rmd
---
title: "Other"
runtime: shiny
---
source
share