{"action":"opened","number":3528,"pull_request":{"url":"https://api.github.com/repos/tidyverse/dplyr/pulls/3528","id":183431515,"html_url":"https://github.com/tidyverse/dplyr/pull/3528","diff_url":"https://github.com/tidyverse/dplyr/pull/3528.diff","patch_url":"https://github.com/tidyverse/dplyr/pull/3528.patch","issue_url":"https://api.github.com/repos/tidyverse/dplyr/issues/3528","number":3528,"state":"open","locked":false,"title":"faster hybrid sum, mean, var and sd for logical vectors. closes #3189","user":{"login":"romainfrancois","id":2625526,"avatar_url":"https://avatars3.githubusercontent.com/u/2625526?v=4","gravatar_id":"","url":"https://api.github.com/users/romainfrancois","html_url":"https://github.com/romainfrancois","followers_url":"https://api.github.com/users/romainfrancois/followers","following_url":"https://api.github.com/users/romainfrancois/following{/other_user}","gists_url":"https://api.github.com/users/romainfrancois/gists{/gist_id}","starred_url":"https://api.github.com/users/romainfrancois/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/romainfrancois/subscriptions","organizations_url":"https://api.github.com/users/romainfrancois/orgs","repos_url":"https://api.github.com/users/romainfrancois/repos","events_url":"https://api.github.com/users/romainfrancois/events{/privacy}","received_events_url":"https://api.github.com/users/romainfrancois/received_events","type":"User","site_admin":false},"body":"Now getting this with the `microbenchmark` from #3189 \r\n\r\n```r\r\n> microbenchmark(\r\n+   # summarizing double variable\r\n+   testTibble %>% summarise(s = sum(a)),\r\n+   # summarizing logical variable <- ISSUE IS HERE\r\n+   testTibble %>% summarise(s = sum(b)),\r\n+   # summarizing integer variable\r\n+   testTibble %>% summarise(s = sum(c)),\r\n+   # compare with simple sums without grouping\r\n+   testTibble %>% pull(a) %>% sum(),\r\n+   testTibble %>% pull(b) %>% sum(),\r\n+   testTibble %>% pull(c) %>% sum()\r\n+ )\r\nUnit: microseconds\r\n                                 expr     min        lq      mean   median        uq      max neval\r\n testTibble %>% summarise(s = sum(a)) 887.793  963.7880 1113.9784 1009.477 1113.3875 3213.814   100\r\n testTibble %>% summarise(s = sum(b)) 914.653 1026.2770 1246.6117 1105.180 1254.5270 3613.427   100\r\n testTibble %>% summarise(s = sum(c)) 910.163 1050.9785 1292.7114 1121.504 1289.3445 3761.196   100\r\n     testTibble %>% pull(a) %>% sum() 234.278  261.6915  313.4974  290.272  338.3865  594.999   100\r\n     testTibble %>% pull(b) %>% sum() 244.330  272.5560  324.5580  300.282  344.5930  676.081   100\r\n     testTibble %>% pull(c) %>% sum() 248.123  273.9390  352.3891  296.661  360.1785 1834.551   100\r\n```","created_at":"2018-04-23T13:17:52Z","updated_at":"2018-04-23T13:17:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/tidyverse/dplyr/pulls/3528/commits","review_comments_url":"https://api.github.com/repos/tidyverse/dplyr/pulls/3528/comments","review_comment_url":"https://api.github.com/repos/tidyverse/dplyr/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tidyverse/dplyr/issues/3528/comments","statuses_url":"https://api.github.com/repos/tidyverse/dplyr/statuses/cc9a9729b51785c4c54c467c16e728383626300a","head":{"label":"tidyverse:feature-3189-sum-logical","ref":"feature-3189-sum-logical","sha":"cc9a9729b51785c4c54c467c16e728383626300a","user":{"login":"tidyverse","id":22032646,"avatar_url":"https://avatars2.githubusercontent.com/u/22032646?v=4","gravatar_id":"","url":"https://api.github.com/users/tidyverse","html_url":"https://github.com/tidyverse","followers_url":"https://api.github.com/users/tidyverse/followers","following_url":"https://api.github.com/users/tidyverse/following{/other_user}","gists_url":"https://api.github.com/users/tidyverse/gists{/gist_id}","starred_url":"https://api.github.com/users/tidyverse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tidyverse/subscriptions","organizations_url":"https://api.github.com/users/tidyverse/orgs","repos_url":"https://api.github.com/users/tidyverse/repos","events_url":"https://api.github.com/users/tidyverse/events{/privacy}","received_events_url":"https://api.github.com/users/tidyverse/received_events","type":"Organization","site_admin":false},"repo":{"id":6427813,"name":"dplyr","full_name":"tidyverse/dplyr","owner":{"login":"tidyverse","id":22032646,"avatar_url":"https://avatars2.githubusercontent.com/u/22032646?v=4","gravatar_id":"","url":"https://api.github.com/users/tidyverse","html_url":"https://github.com/tidyverse","followers_url":"https://api.github.com/users/tidyverse/followers","following_url":"https://api.github.com/users/tidyverse/following{/other_user}","gists_url":"https://api.github.com/users/tidyverse/gists{/gist_id}","starred_url":"https://api.github.com/users/tidyverse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tidyverse/subscriptions","organizations_url":"https://api.github.com/users/tidyverse/orgs","repos_url":"https://api.github.com/users/tidyverse/repos","events_url":"https://api.github.com/users/tidyverse/events{/privacy}","received_events_url":"https://api.github.com/users/tidyverse/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tidyverse/dplyr","description":"dplyr: A grammar of data manipulation","fork":false,"url":"https://api.github.com/repos/tidyverse/dplyr","forks_url":"https://api.github.com/repos/tidyverse/dplyr/forks","keys_url":"https://api.github.com/repos/tidyverse/dplyr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tidyverse/dplyr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tidyverse/dplyr/teams","hooks_url":"https://api.github.com/repos/tidyverse/dplyr/hooks","issue_events_url":"https://api.github.com/repos/tidyverse/dplyr/issues/events{/number}","events_url":"https://api.github.com/repos/tidyverse/dplyr/events","assignees_url":"https://api.github.com/repos/tidyverse/dplyr/assignees{/user}","branches_url":"https://api.github.com/repos/tidyverse/dplyr/branches{/branch}","tags_url":"https://api.github.com/repos/tidyverse/dplyr/tags","blobs_url":"https://api.github.com/repos/tidyverse/dplyr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tidyverse/dplyr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tidyverse/dplyr/git/refs{/sha}","trees_url":"https://api.github.com/repos/tidyverse/dplyr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tidyverse/dplyr/statuses/{sha}","languages_url":"https://api.github.com/repos/tidyverse/dplyr/languages","stargazers_url":"https://api.github.com/repos/tidyverse/dplyr/stargazers","contributors_url":"https://api.github.com/repos/tidyverse/dplyr/contributors","subscribers_url":"https://api.github.com/repos/tidyverse/dplyr/subscribers","subscription_url":"https://api.github.com/repos/tidyverse/dplyr/subscription","commits_url":"https://api.github.com/repos/tidyverse/dplyr/commits{/sha}","git_commits_url":"https://api.github.com/repos/tidyverse/dplyr/git/commits{/sha}","comments_url":"https://api.github.com/repos/tidyverse/dplyr/comments{/number}","issue_comment_url":"https://api.github.com/repos/tidyverse/dplyr/issues/comments{/number}","contents_url":"https://api.github.com/repos/tidyverse/dplyr/contents/{+path}","compare_url":"https://api.github.com/repos/tidyverse/dplyr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tidyverse/dplyr/merges","archive_url":"https://api.github.com/repos/tidyverse/dplyr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tidyverse/dplyr/downloads","issues_url":"https://api.github.com/repos/tidyverse/dplyr/issues{/number}","pulls_url":"https://api.github.com/repos/tidyverse/dplyr/pulls{/number}","milestones_url":"https://api.github.com/repos/tidyverse/dplyr/milestones{/number}","notifications_url":"https://api.github.com/repos/tidyverse/dplyr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tidyverse/dplyr/labels{/name}","releases_url":"https://api.github.com/repos/tidyverse/dplyr/releases{/id}","deployments_url":"https://api.github.com/repos/tidyverse/dplyr/deployments","created_at":"2012-10-28T13:39:17Z","updated_at":"2018-04-23T12:44:51Z","pushed_at":"2018-04-23T13:16:57Z","git_url":"git://github.com/tidyverse/dplyr.git","ssh_url":"git@github.com:tidyverse/dplyr.git","clone_url":"https://github.com/tidyverse/dplyr.git","svn_url":"https://github.com/tidyverse/dplyr","homepage":"http://dplyr.tidyverse.org","size":17278,"stargazers_count":2336,"watchers_count":2336,"language":"R","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":894,"mirror_url":null,"archived":false,"open_issues_count":177,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":894,"open_issues":177,"watchers":2336,"default_branch":"master"}},"base":{"label":"tidyverse:master","ref":"master","sha":"fbbf15707aa4a7e16344ee5c0d3d6b71bbe5ed99","user":{"login":"tidyverse","id":22032646,"avatar_url":"https://avatars2.githubusercontent.com/u/22032646?v=4","gravatar_id":"","url":"https://api.github.com/users/tidyverse","html_url":"https://github.com/tidyverse","followers_url":"https://api.github.com/users/tidyverse/followers","following_url":"https://api.github.com/users/tidyverse/following{/other_user}","gists_url":"https://api.github.com/users/tidyverse/gists{/gist_id}","starred_url":"https://api.github.com/users/tidyverse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tidyverse/subscriptions","organizations_url":"https://api.github.com/users/tidyverse/orgs","repos_url":"https://api.github.com/users/tidyverse/repos","events_url":"https://api.github.com/users/tidyverse/events{/privacy}","received_events_url":"https://api.github.com/users/tidyverse/received_events","type":"Organization","site_admin":false},"repo":{"id":6427813,"name":"dplyr","full_name":"tidyverse/dplyr","owner":{"login":"tidyverse","id":22032646,"avatar_url":"https://avatars2.githubusercontent.com/u/22032646?v=4","gravatar_id":"","url":"https://api.github.com/users/tidyverse","html_url":"https://github.com/tidyverse","followers_url":"https://api.github.com/users/tidyverse/followers","following_url":"https://api.github.com/users/tidyverse/following{/other_user}","gists_url":"https://api.github.com/users/tidyverse/gists{/gist_id}","starred_url":"https://api.github.com/users/tidyverse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tidyverse/subscriptions","organizations_url":"https://api.github.com/users/tidyverse/orgs","repos_url":"https://api.github.com/users/tidyverse/repos","events_url":"https://api.github.com/users/tidyverse/events{/privacy}","received_events_url":"https://api.github.com/users/tidyverse/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tidyverse/dplyr","description":"dplyr: A grammar of data manipulation","fork":false,"url":"https://api.github.com/repos/tidyverse/dplyr","forks_url":"https://api.github.com/repos/tidyverse/dplyr/forks","keys_url":"https://api.github.com/repos/tidyverse/dplyr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tidyverse/dplyr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tidyverse/dplyr/teams","hooks_url":"https://api.github.com/repos/tidyverse/dplyr/hooks","issue_events_url":"https://api.github.com/repos/tidyverse/dplyr/issues/events{/number}","events_url":"https://api.github.com/repos/tidyverse/dplyr/events","assignees_url":"https://api.github.com/repos/tidyverse/dplyr/assignees{/user}","branches_url":"https://api.github.com/repos/tidyverse/dplyr/branches{/branch}","tags_url":"https://api.github.com/repos/tidyverse/dplyr/tags","blobs_url":"https://api.github.com/repos/tidyverse/dplyr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tidyverse/dplyr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tidyverse/dplyr/git/refs{/sha}","trees_url":"https://api.github.com/repos/tidyverse/dplyr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tidyverse/dplyr/statuses/{sha}","languages_url":"https://api.github.com/repos/tidyverse/dplyr/languages","stargazers_url":"https://api.github.com/repos/tidyverse/dplyr/stargazers","contributors_url":"https://api.github.com/repos/tidyverse/dplyr/contributors","subscribers_url":"https://api.github.com/repos/tidyverse/dplyr/subscribers","subscription_url":"https://api.github.com/repos/tidyverse/dplyr/subscription","commits_url":"https://api.github.com/repos/tidyverse/dplyr/commits{/sha}","git_commits_url":"https://api.github.com/repos/tidyverse/dplyr/git/commits{/sha}","comments_url":"https://api.github.com/repos/tidyverse/dplyr/comments{/number}","issue_comment_url":"https://api.github.com/repos/tidyverse/dplyr/issues/comments{/number}","contents_url":"https://api.github.com/repos/tidyverse/dplyr/contents/{+path}","compare_url":"https://api.github.com/repos/tidyverse/dplyr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tidyverse/dplyr/merges","archive_url":"https://api.github.com/repos/tidyverse/dplyr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tidyverse/dplyr/downloads","issues_url":"https://api.github.com/repos/tidyverse/dplyr/issues{/number}","pulls_url":"https://api.github.com/repos/tidyverse/dplyr/pulls{/number}","milestones_url":"https://api.github.com/repos/tidyverse/dplyr/milestones{/number}","notifications_url":"https://api.github.com/repos/tidyverse/dplyr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tidyverse/dplyr/labels{/name}","releases_url":"https://api.github.com/repos/tidyverse/dplyr/releases{/id}","deployments_url":"https://api.github.com/repos/tidyverse/dplyr/deployments","created_at":"2012-10-28T13:39:17Z","updated_at":"2018-04-23T12:44:51Z","pushed_at":"2018-04-23T13:16:57Z","git_url":"git://github.com/tidyverse/dplyr.git","ssh_url":"git@github.com:tidyverse/dplyr.git","clone_url":"https://github.com/tidyverse/dplyr.git","svn_url":"https://github.com/tidyverse/dplyr","homepage":"http://dplyr.tidyverse.org","size":17278,"stargazers_count":2336,"watchers_count":2336,"language":"R","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":894,"mirror_url":null,"archived":false,"open_issues_count":177,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":894,"open_issues":177,"watchers":2336,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tidyverse/dplyr/pulls/3528"},"html":{"href":"https://github.com/tidyverse/dplyr/pull/3528"},"issue":{"href":"https://api.github.com/repos/tidyverse/dplyr/issues/3528"},"comments":{"href":"https://api.github.com/repos/tidyverse/dplyr/issues/3528/comments"},"review_comments":{"href":"https://api.github.com/repos/tidyverse/dplyr/pulls/3528/comments"},"review_comment":{"href":"https://api.github.com/repos/tidyverse/dplyr/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tidyverse/dplyr/pulls/3528/commits"},"statuses":{"href":"https://api.github.com/repos/tidyverse/dplyr/statuses/cc9a9729b51785c4c54c467c16e728383626300a"}},"author_association":"COLLABORATOR","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":60,"deletions":10,"changed_files":3}}
{"actor":{"display_login":"romainfrancois"}}