我正在运行以下交互式rmarkdown文档:
### Example of shiny app
```{r, echo = FALSE, eval = TRUE}
numericInput("rows", "How many cars?", 5)
renderTable({
head(cars, input$rows)
})
```
### Another example
```{r, echo = FALSE}
sliderInput("bins", "Number of bins:", min = 1, max = 50, value = 30)
renderPlot({
x <- faithful[, 2] # Old Faithful Geyser data
bins <- seq(min(x), max(x), length.out = input$bins + 1)
# draw the histogram with the specified number of bins
hist(x, breaks = bins, col = 'darkgray', border …Run Code Online (Sandbox Code Playgroud)