{"issue":{"state":"closed","created_at":"2011-08-02T18:27:43Z","updated_at":"2011-12-15T13:15:16Z","user":{"gravatar_id":"b03b24d83939c4e11735af5340d90409","id":463252,"url":"https://api.github.com/users/BrianDiggs","avatar_url":"https://secure.gravatar.com/avatar/b03b24d83939c4e11735af5340d90409?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"BrianDiggs"},"comments":3,"body":"# Description\r\n\r\nIn the develop branch, when calling summary on a ggplot object, it exits with an error when printing the faceting information\r\n\r\n# Reproducible code\r\n\r\n```r\r\nsummary(ggplot())\r\n```\r\n\r\n# Actual output\r\n\r\n```\r\n> summary(ggplot())\r\ndata: [0x0]\r\nfaceting: Error in summary.ggplot(ggplot()) : attempt to apply non-function\r\n```\r\n\r\n# Expected output\r\n\r\nIn version 0.8.9, the output is\r\n\r\n```\r\n> summary(ggplot())\r\ndata: [0x0]\r\nfaceting: facet_grid(. ~ ., FALSE)\r\n```\r\n\r\nThis is not necessarily what it should be, but at least it shouldn't throw an error.\r\n\r\n# Diagnosis\r\n\r\nIn `summary.ggplot`, (https://github.com/hadley/ggplot2/blob/develop/R/summary.r#L35), there is the call `object$facet$pprint()`.  git blame shows this line is from the initial import of ggplot to git.  Since the results of a facet are no longer a `proto` object, but a list of class \"facet\", there is no `pprint` function to call.  A `print.facet` (and maybe a `summary.facet`?) function is needed to print out a summary appropriate for this use.\r\n\r\n# sessionInfo\r\n\r\n```\r\n> sessionInfo()\r\nR version 2.13.1 (2011-07-08)\r\nPlatform: x86_64-pc-mingw32/x64 (64-bit)\r\n\r\nlocale:\r\n[1] LC_COLLATE=English_United States.1252 \r\n[2] LC_CTYPE=English_United States.1252   \r\n[3] LC_MONETARY=English_United States.1252\r\n[4] LC_NUMERIC=C                          \r\n[5] LC_TIME=English_United States.1252    \r\n\r\nattached base packages:\r\n[1] grid      stats     graphics  grDevices utils     datasets  methods  \r\n[8] base     \r\n\r\nother attached packages:\r\n[1] ggplot2_0.9.0 memoise_0.1   scales_0.1.0  reshape2_1.1  plyr_1.6     \r\n[6] proto_0.3-9.2 roxygen2_2.0  digest_0.5.0  devtools_0.4 \r\n\r\nloaded via a namespace (and not attached):\r\n[1] brew_1.0-6         codetools_0.2-8    colorspace_1.1-0   dichromat_1.2-3   \r\n[5] munsell_0.2        RColorBrewer_1.0-5 RCurl_1.6-6.1      stringr_0.5       \r\n[9] tools_2.13.1      \r\n```","assignee":null,"id":1332164,"labels":[{"name":"bug","color":"e02a2a","url":"https://api.github.com/repos/hadley/ggplot2/labels/bug"}],"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"number":213,"title":"summary exits with error","html_url":"https://github.com/hadley/ggplot2/issues/213","closed_at":"2011-12-10T13:26:16Z","milestone":{"state":"open","created_at":"2011-08-15T10:23:47Z","due_on":null,"closed_issues":18,"creator":{"gravatar_id":"7ba164f40a50bc23dbb2aa825fb7bc16","id":4196,"url":"https://api.github.com/users/hadley","avatar_url":"https://secure.gravatar.com/avatar/7ba164f40a50bc23dbb2aa825fb7bc16?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"hadley"},"number":1,"title":"0.9","description":"","url":"https://api.github.com/repos/hadley/ggplot2/milestones/1","open_issues":15},"url":"https://api.github.com/repos/hadley/ggplot2/issues/213"},"action":"created","comment":{"created_at":"2011-12-15T13:15:16Z","updated_at":"2011-12-15T13:15:16Z","user":{"gravatar_id":"7ba164f40a50bc23dbb2aa825fb7bc16","id":4196,"url":"https://api.github.com/users/hadley","avatar_url":"https://secure.gravatar.com/avatar/7ba164f40a50bc23dbb2aa825fb7bc16?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"hadley"},"body":"Oops, yes, thanks.","id":3160777,"url":"https://api.github.com/repos/hadley/ggplot2/issues/comments/3160777"}}