I am facing a issue here. Below is the simple app, i am trying to get below output but not getting. can anyone please help. 1) When I select iris, in Page1 and Page2, the iris dataset is displayed that is fine. So from here if I select any specific row (In Page1), that specific row should be displayed in the next tab (Page 2). For example refer below . Is it possible to have 6th row(selected) in the next tab (page2). Similarly Once I unselect iris data set, All datasets should disappear. is it possible to achieve this?
---
title: "Untitled"
runtime: shiny
output:
flexdashboard::flex_dashboard:
orientation: columns
vertical_layout: fill
---
```{r setup, include=FALSE}
library(flexdashboard)
```
Page 1
=====================================
### Chart A
```{r}
selectInput("dataset","Select",choices = c("","iris","mtcars"))
DT::DTOutput('table1')
datasetInput <- reactive({
switch(input$dataset,
"iris" = iris,
"mtcars" = mtcars)
})
output$table1 <- DT::renderDT({
head(datasetInput(), n = 10)
})
```
Page 2
=====================================
### Reactive
```{r}
DT::DTOutput('table2')
datasetInput <- reactive({
switch(input$dataset,
"iris" = iris,
"mtcars" = mtcars)
})
output$table2 <- DT::renderDT({
head(datasetInput(), n = 100)
})