Is there any way, without using shiny, how to filter the data using html drop down in rMarkdown ioslides_presentation (or some kind of javascript function)?
I have very simple code using mtcars data and html drop down menu. I'd like to filter the mtcars data frame via html drop down, something like mtcars[mtcars$mpg > 'value1'.
Is it possible to do that in rMarkdown ioslides_presentation or there is only way to do that via Shiny reactive programming. Thanks a lot for your advice in advance.
---
date: "`r Sys.Date()`"
output: ioslides_presentation
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
## Slide 1
<div>
<select name="mpgFilter" id="mpgFilter">
<option value="1">mpg > 21</option>
<option value="2">mpg > 18</option>
<option value="3">mpg > 15</option>
</select>
</div>
```{r echo=FALSE}
data("mtcars")
mtcarsData <- mtcars[mtcars$mpg > 21,]
plot(mtcarsData$mpg, mtcarsData$disp)
```