{"action":"created","issue":{"url":"https://api.github.com/repos/jimhester/covr/issues/57","labels_url":"https://api.github.com/repos/jimhester/covr/issues/57/labels{/name}","comments_url":"https://api.github.com/repos/jimhester/covr/issues/57/comments","events_url":"https://api.github.com/repos/jimhester/covr/issues/57/events","html_url":"https://github.com/jimhester/covr/issues/57","id":57852315,"number":57,"title":"Error in aggregate.data.frame","user":{"login":"piccolbo","id":905563,"avatar_url":"https://avatars.githubusercontent.com/u/905563?v=3","gravatar_id":"","url":"https://api.github.com/users/piccolbo","html_url":"https://github.com/piccolbo","followers_url":"https://api.github.com/users/piccolbo/followers","following_url":"https://api.github.com/users/piccolbo/following{/other_user}","gists_url":"https://api.github.com/users/piccolbo/gists{/gist_id}","starred_url":"https://api.github.com/users/piccolbo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/piccolbo/subscriptions","organizations_url":"https://api.github.com/users/piccolbo/orgs","repos_url":"https://api.github.com/users/piccolbo/repos","events_url":"https://api.github.com/users/piccolbo/events{/privacy}","received_events_url":"https://api.github.com/users/piccolbo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-02-16T21:18:47Z","updated_at":"2015-02-17T16:01:02Z","closed_at":null,"body":"This might very well be operator error, but ...\r\n\r\n```\r\nff = function(x) identity(x)\r\nfunction_coverage(\"ff\", ff(1))\r\n```\r\nResults in \r\n```\r\nError in aggregate.data.frame(mf[1L], mf[-1L], FUN = FUN, ...) : \r\n  no rows to aggregate\r\n```\r\nWhat am I missing? Thanks"},"comment":{"url":"https://api.github.com/repos/jimhester/covr/issues/comments/74691941","html_url":"https://github.com/jimhester/covr/issues/57#issuecomment-74691941","issue_url":"https://api.github.com/repos/jimhester/covr/issues/57","id":74691941,"user":{"login":"jimhester","id":205275,"avatar_url":"https://avatars.githubusercontent.com/u/205275?v=3","gravatar_id":"","url":"https://api.github.com/users/jimhester","html_url":"https://github.com/jimhester","followers_url":"https://api.github.com/users/jimhester/followers","following_url":"https://api.github.com/users/jimhester/following{/other_user}","gists_url":"https://api.github.com/users/jimhester/gists{/gist_id}","starred_url":"https://api.github.com/users/jimhester/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimhester/subscriptions","organizations_url":"https://api.github.com/users/jimhester/orgs","repos_url":"https://api.github.com/users/jimhester/repos","events_url":"https://api.github.com/users/jimhester/events{/privacy}","received_events_url":"https://api.github.com/users/jimhester/received_events","type":"User","site_admin":false},"created_at":"2015-02-17T16:01:02Z","updated_at":"2015-02-17T16:01:02Z","body":"This is a bug related to https://github.com/jimhester/covr/issues/24.  Because the function has no filename `as.data.frame.coverage` works incorrectly.\r\n\r\nYou can fix the example by pre-pending a filename to the names attribute of the returned coverage.\r\n\r\n```r\r\nff = function(x) identity(x)\r\ncov <- function_coverage(\"ff\", ff(1))\r\nnames(cov) <- paste0(\"<file>\", names(cov))\r\ncov\r\n\r\n# Package Coverage: 100.00%\r\n# <file>: 100.00%\r\n\r\nas.data.frame(cov)\r\n#   filename first_line first_byte last_line last_byte first_column last_column first_parsed last_parsed value\r\n# 1   <file>          1          6         1        28            6          28            1           1     1\r\n```\r\n\r\nThat being said this is a bug.  Additionally reporting \"Package Coverage\" from the print method when printing function coverage also makes no sense, we should probably change that to \"Overall Coverage\" to be general."}}