Clean up exports, examples

This commit is contained in:
Joe Cheng
2014-03-31 16:40:17 -07:00
parent 887f8a606d
commit fd7b54fb77
6 changed files with 45 additions and 7 deletions

View File

@@ -0,0 +1,26 @@
# Reactive document 1
Here's some inputs
```{r}
div(
selectInput("dataset", "Dataset", c("cars", "iris", "mtcars")),
numericInput("rows", "Rows to show", 5)
)
```
Here's some reactive stuff
```{r}
ds <- reactive({
get(input$dataset, pos="package:datasets", inherits=FALSE)
})
output$table <- renderTable({
head(ds(), input$rows)
})
tableOutput("table")
output$plot <- renderPlot({
plot(ds())
})
plotOutput("plot")
```