如果我有以下代码在 RMarkdown flex_dashboard 中创建复选框,我如何访问复选框创建的变量以供以后在代码中使用?
---
title: "Temp Dashboard"
author: "Me"
output:
flexdashboard::flex_dashboard:
orientation: rows
vertical_layout: scroll
---
```{r global, include=FALSE}
library(htmltools)
theme_set(theme_classic())
```
Column {.sidebar data-width=200}
-------------------------------------
### Filters
<form>
<input type="checkbox" name="type1" value=1>
<label for="type1"> Include type1 models</label><br>
<input type="checkbox" name="type2" value=2>
<label for="type2"> Include type2 models</label><br><br>
<input type="submit" value="Go">
</form>
Row
-----------------------------------------------------------------------
```{r}
print(type1)
print(type2)
```
Go
我还应该注意,每次在仪表板中按下按钮时,我都需要在 R 中更新值。我需要避免使用闪亮,因为我被限制在没有闪亮服务器的环境中。提前感谢您的帮助!