{"action":"created","issue":{"url":"https://api.github.com/repos/Rapporter/pander/issues/237","labels_url":"https://api.github.com/repos/Rapporter/pander/issues/237/labels{/name}","comments_url":"https://api.github.com/repos/Rapporter/pander/issues/237/comments","events_url":"https://api.github.com/repos/Rapporter/pander/issues/237/events","html_url":"https://github.com/Rapporter/pander/issues/237","id":124063286,"number":237,"title":"`summary` with `as.Date` converts date to integer","user":{"login":"mrdwab","id":802388,"avatar_url":"https://avatars.githubusercontent.com/u/802388?v=3","gravatar_id":"","url":"https://api.github.com/users/mrdwab","html_url":"https://github.com/mrdwab","followers_url":"https://api.github.com/users/mrdwab/followers","following_url":"https://api.github.com/users/mrdwab/following{/other_user}","gists_url":"https://api.github.com/users/mrdwab/gists{/gist_id}","starred_url":"https://api.github.com/users/mrdwab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrdwab/subscriptions","organizations_url":"https://api.github.com/users/mrdwab/orgs","repos_url":"https://api.github.com/users/mrdwab/repos","events_url":"https://api.github.com/users/mrdwab/events{/privacy}","received_events_url":"https://api.github.com/users/mrdwab/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-12-28T12:42:20Z","updated_at":"2015-12-28T18:30:33Z","closed_at":null,"body":"`as.Date` objects seem to require an `as.character` to suppress printing as integers when using `summary` in Pander 0.6.0\r\n\r\nQuick demo:\r\n\r\n```r\r\nset.seed(1); df <- data.frame(id = 1:10, date = Sys.Date() + sample(-50:50, 10, TRUE))\r\npander(df)\r\n```\r\n\r\nOutput is OK:\r\n\r\n```\r\n---------------\r\n id     date   \r\n---- ----------\r\n 1   2015-12-04\r\n\r\n 2   2015-12-15\r\n\r\n 3   2016-01-04\r\n\r\n 4   2016-02-07\r\n\r\n 5   2015-11-28\r\n\r\n 6   2016-02-06\r\n\r\n 7   2016-02-11\r\n\r\n 8   2016-01-13\r\n\r\n 9   2016-01-10\r\n\r\n 10  2015-11-14\r\n---------------\r\n```\r\n\r\nBut:\r\n\r\n```r\r\npander(summary(df$date))\r\n```\r\n\r\nOutput is converted to integer:\r\n\r\n```\r\n-------------------------------------------------\r\n Min.   1st Qu.   Median   Mean   3rd Qu.   Max. \r\n------ --------- -------- ------ --------- ------\r\n16753    16776    16807   16802    16831   16842 \r\n-------------------------------------------------\r\n```"},"comment":{"url":"https://api.github.com/repos/Rapporter/pander/issues/comments/167622481","html_url":"https://github.com/Rapporter/pander/issues/237#issuecomment-167622481","issue_url":"https://api.github.com/repos/Rapporter/pander/issues/237","id":167622481,"user":{"login":"daroczig","id":495736,"avatar_url":"https://avatars.githubusercontent.com/u/495736?v=3","gravatar_id":"","url":"https://api.github.com/users/daroczig","html_url":"https://github.com/daroczig","followers_url":"https://api.github.com/users/daroczig/followers","following_url":"https://api.github.com/users/daroczig/following{/other_user}","gists_url":"https://api.github.com/users/daroczig/gists{/gist_id}","starred_url":"https://api.github.com/users/daroczig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daroczig/subscriptions","organizations_url":"https://api.github.com/users/daroczig/orgs","repos_url":"https://api.github.com/users/daroczig/repos","events_url":"https://api.github.com/users/daroczig/events{/privacy}","received_events_url":"https://api.github.com/users/daroczig/received_events","type":"User","site_admin":false},"created_at":"2015-12-28T18:30:32Z","updated_at":"2015-12-28T18:30:32Z","body":"Thanks for reporting this issues, which happens due to the behavior of `as.matrix` we used to standardize different tabular objects in 0.6. See eg:\r\n\r\n```r\r\n> summary(df$date)\r\n        Min.      1st Qu.       Median         Mean      3rd Qu.         Max. \r\n\"2015-11-14\" \"2015-12-06\" \"2016-01-07\" \"2016-01-02\" \"2016-01-31\" \"2016-02-11\" \r\n```\r\n\r\nversus\r\n\r\n```r\r\n> as.matrix(summary(df$date))\r\n            [,1]\r\nMin.    16753.00\r\n1st Qu. 16775.75\r\nMedian  16807.00\r\nMean    16802.10\r\n3rd Qu. 16831.00\r\nMax.    16842.00\r\n```\r\n\r\nI'll think about the potential solutions for this."}}