Advertisement
Guest User

Untitled

a guest
Jul 6th, 2015
231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. library(ggplot2)
  2. library(DT)
  3.  
  4. ui <- shinyUI(fluidPage(
  5. fluidRow(uiOutput("plotui")),
  6. fluidRow(dataTableOutput("plot_brushed_points"))))
  7.  
  8. server <- shinyServer(function(input, output, session) {
  9. output$plotui <- renderUI({
  10. plotOutput("plot",brush = brushOpts(id = "plot_brush"))})
  11.  
  12. output$plot <- renderPlot({plot(mtcars$wt,mtcars$mpg)})
  13.  
  14. output$plot_brushed_points <- renderDataTable({
  15. brushedPoints(mtcars, input$plot_brush, mtcars$wt, mtcars$mpg)})
  16. })
  17.  
  18. myapp <- shinyApp(ui, server)
  19. myapp
  20.  
  21. Error in .subset2(x, i, exact = exact) :
  22. recursive indexing failed at level 2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement