{"action":"opened","issue":{"url":"https://api.github.com/repos/hadley/dplyr/issues/1747","repository_url":"https://api.github.com/repos/hadley/dplyr","labels_url":"https://api.github.com/repos/hadley/dplyr/issues/1747/labels{/name}","comments_url":"https://api.github.com/repos/hadley/dplyr/issues/1747/comments","events_url":"https://api.github.com/repos/hadley/dplyr/issues/1747/events","html_url":"https://github.com/hadley/dplyr/issues/1747","id":144977763,"number":1747,"title":"cannot find \"median\" in `summerise_`","user":{"login":"koaning","id":1019791,"avatar_url":"https://avatars.githubusercontent.com/u/1019791?v=3","gravatar_id":"","url":"https://api.github.com/users/koaning","html_url":"https://github.com/koaning","followers_url":"https://api.github.com/users/koaning/followers","following_url":"https://api.github.com/users/koaning/following{/other_user}","gists_url":"https://api.github.com/users/koaning/gists{/gist_id}","starred_url":"https://api.github.com/users/koaning/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/koaning/subscriptions","organizations_url":"https://api.github.com/users/koaning/orgs","repos_url":"https://api.github.com/users/koaning/repos","events_url":"https://api.github.com/users/koaning/events{/privacy}","received_events_url":"https://api.github.com/users/koaning/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-03-31T18:15:41Z","updated_at":"2016-03-31T18:15:41Z","closed_at":null,"body":"We can use `summarise_` in those pesky situations in Shiny when we want to select a function to apply to a dataframe. This often works just fine, like below; \r\n\r\n```\r\n> ChickWeight %>% \r\n  group_by(Diet) %>% \r\n  summarise_(\"mean(weight)\")\r\n```\r\n\r\nHere the string `mean(weight)` gets handled appropriately and we get a nice summary back for every `Diet`. The mean works just fine, the median function however gives an odd error; \r\n\r\n```\r\nChickWeight %>% \r\n  group_by(Diet) %>% \r\n  summarise_(\"median(weight)\")\r\n```\r\n\r\nThis returns a `Error: could not find function \"median\"` error. The normal `summarise` (without `_`) does work and other aggregation functions seem to work as well. Any idea what might be causing this? \r\n\r\nI also notice that the `summarise_` approach does not seem to work on user defined functions. Is `dplyr` using internal Rcpp functions when it sees `mean`/`var`/`max`/`min`? If thats the case it might need to have `median` added. "}}