{"action":"created","issue":{"url":"https://api.github.com/repos/hadley/ggplot2/issues/1136","labels_url":"https://api.github.com/repos/hadley/ggplot2/issues/1136/labels{/name}","comments_url":"https://api.github.com/repos/hadley/ggplot2/issues/1136/comments","events_url":"https://api.github.com/repos/hadley/ggplot2/issues/1136/events","html_url":"https://github.com/hadley/ggplot2/issues/1136","id":89211711,"number":1136,"title":"geom_violin produces error when all values in a series are the same","user":{"login":"RichardLorenz","id":8924216,"avatar_url":"https://avatars.githubusercontent.com/u/8924216?v=3","gravatar_id":"","url":"https://api.github.com/users/RichardLorenz","html_url":"https://github.com/RichardLorenz","followers_url":"https://api.github.com/users/RichardLorenz/followers","following_url":"https://api.github.com/users/RichardLorenz/following{/other_user}","gists_url":"https://api.github.com/users/RichardLorenz/gists{/gist_id}","starred_url":"https://api.github.com/users/RichardLorenz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RichardLorenz/subscriptions","organizations_url":"https://api.github.com/users/RichardLorenz/orgs","repos_url":"https://api.github.com/users/RichardLorenz/repos","events_url":"https://api.github.com/users/RichardLorenz/events{/privacy}","received_events_url":"https://api.github.com/users/RichardLorenz/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-18T06:27:40Z","updated_at":"2015-06-18T11:18:50Z","closed_at":"2015-06-18T11:18:50Z","body":"Posted on StackOverflow:\r\n\r\nhttp://stackoverflow.com/questions/30721548/geom-violin-produces-error-when-all-values-in-a-series-are-the-same\r\n\r\n    library(ggplot2)\r\n    d1 <- data.frame(x=c(\"a\",\"a\",\"a\",\"b\",\"b\",\"b\"),y=c(1,2,2,1,2,1)) # Two series of three with different values through each series\r\n    d2 <- data.frame(x=c(\"a\",\"a\",\"a\",\"b\",\"b\",\"b\"),y=c(1,2,2,1,1,1)) # Two series of three, one series has all the same values\r\n    ggplot(data=d1) + geom_violin(aes(x=x,y=y))                     # This works\r\n    ggplot(data=d2) + geom_violin(aes(x=x,y=y))                     # This produces an error\r\n\r\n    Error message: \r\n    Error in `$<-.data.frame`(`*tmp*`, \"n\", value = 3L) : \r\n      replacement has 1 row, data has 0"},"comment":{"url":"https://api.github.com/repos/hadley/ggplot2/issues/comments/113116240","html_url":"https://github.com/hadley/ggplot2/issues/1136#issuecomment-113116240","issue_url":"https://api.github.com/repos/hadley/ggplot2/issues/1136","id":113116240,"user":{"login":"hadley","id":4196,"avatar_url":"https://avatars.githubusercontent.com/u/4196?v=3","gravatar_id":"","url":"https://api.github.com/users/hadley","html_url":"https://github.com/hadley","followers_url":"https://api.github.com/users/hadley/followers","following_url":"https://api.github.com/users/hadley/following{/other_user}","gists_url":"https://api.github.com/users/hadley/gists{/gist_id}","starred_url":"https://api.github.com/users/hadley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hadley/subscriptions","organizations_url":"https://api.github.com/users/hadley/orgs","repos_url":"https://api.github.com/users/hadley/repos","events_url":"https://api.github.com/users/hadley/events{/privacy}","received_events_url":"https://api.github.com/users/hadley/received_events","type":"User","site_admin":false},"created_at":"2015-06-18T11:18:50Z","updated_at":"2015-06-18T11:18:50Z","body":"Already fixed in the dev version."}}