{"action":"closed","issue":{"url":"https://api.github.com/repos/rstudio/shiny/issues/1420","repository_url":"https://api.github.com/repos/rstudio/shiny","labels_url":"https://api.github.com/repos/rstudio/shiny/issues/1420/labels{/name}","comments_url":"https://api.github.com/repos/rstudio/shiny/issues/1420/comments","events_url":"https://api.github.com/repos/rstudio/shiny/issues/1420/events","html_url":"https://github.com/rstudio/shiny/issues/1420","id":182678719,"number":1420,"title":"shiny::brushedPoints fails to detect axis variables in dev version of ggplot2","user":{"login":"petersmp","id":11709707,"avatar_url":"https://avatars.githubusercontent.com/u/11709707?v=3","gravatar_id":"","url":"https://api.github.com/users/petersmp","html_url":"https://github.com/petersmp","followers_url":"https://api.github.com/users/petersmp/followers","following_url":"https://api.github.com/users/petersmp/following{/other_user}","gists_url":"https://api.github.com/users/petersmp/gists{/gist_id}","starred_url":"https://api.github.com/users/petersmp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petersmp/subscriptions","organizations_url":"https://api.github.com/users/petersmp/orgs","repos_url":"https://api.github.com/users/petersmp/repos","events_url":"https://api.github.com/users/petersmp/events{/privacy}","received_events_url":"https://api.github.com/users/petersmp/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-10-13T02:17:12Z","updated_at":"2016-10-13T02:45:15Z","closed_at":"2016-10-13T02:45:15Z","body":"I am not sure whether this should be considered a bug in `ggplot2` or in `shiny`, so I am filing it in both places ([here is the issue at ggplot](https://github.com/hadley/ggplot2/issues/1850) )\r\n\r\nWhen using the dev version of `ggplot2`, attempts to use `shiny::brushedPoints` leads to the error:\r\n\r\n> Error in brushedPoints: brushedPoints: not able to automatically infer `xvar` from brush\r\n\r\nI reverted to the stable version of `ggplot2`, and the same code works. I am not clear enough on the structure of the communication to track down what is going wrong. I will try to start digging tomorrow.\r\n\r\nHere is minimal code to reproduce the error. Simply brushing on the plot causes the app to crash.\r\n\r\n    library(shiny)\r\n    library(tidyverse)\r\n    \r\n    server <- function(input, output, session) {\r\n      \r\n      output$distPlot <- renderPlot({\r\n        iris %>%\r\n          ggplot(aes(x = Sepal.Length\r\n                     , y = Sepal.Width)) +\r\n          geom_point()\r\n      })\r\n      \r\n      observeEvent(input$point_Brush, {\r\n        brushedPoints(iris, input$point_Brush)\r\n      })\r\n      \r\n    }\r\n    \r\n    ui <- fluidPage(\r\n      fluidRow(\r\n        plotOutput(\"distPlot\"\r\n                   , brush = \"point_Brush\")\r\n      )\r\n      \r\n    )\r\n    \r\n    shinyApp(ui = ui, server = server)\r\n"}}
{"actor":{"display_login":"petersmp"}}