我正在尝试为工作表中的datatable
对象构建选择器flexmarkdown
。
所以这是我当前的(示例)布局,我正在尝试构建一个反应选择器,该选择器采用左侧的矿物类型输入,然后重新渲染整个表格以仅在此选择“Rock Type = Type 1”案子。
完整源代码@pastebin:链接
我当前的选择器:
```{r}
selectInput("input_type","Mineral Type:", data$`Rock Type`)
```
我可以通过执行以下操作来实现这一点,但我还想为所有/无分组建立一个选择。
```{r}
dataInput <- reactive({
subset(data,data$`Rock Type` == input$input_type)
})
renderDataTable(dataInput())
```