{"action":"created","comment":{"url":"https://api.github.com/repos/tidyverse/dplyr/pulls/comments/218793660","pull_request_review_id":156807788,"id":218793660,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxODc5MzY2MA==","diff_hunk":"@@ -173,24 +173,49 @@ class Expression {\n   // is the i-th argument a scalar int\n   inline bool is_scalar_int(int i, int& out) const {\n     SEXP val = values[i];\n-    if (Rf_length(val) != 1) return false;\n+    bool unary_minus = false;\n+\n+    // unary minus\n+    if (TYPEOF(val) == LANGSXP && Rf_length(val) == 2 && CAR(val) == Rf_install(\"-\")) {","path":"inst/include/dplyr/hybrid/Expression.h","position":8,"original_position":8,"commit_id":"21baa5fad37cd51c476cbd50c2e9f6d70c5dc8cc","original_commit_id":"21baa5fad37cd51c476cbd50c2e9f6d70c5dc8cc","user":{"login":"romainfrancois","id":2625526,"node_id":"MDQ6VXNlcjI2MjU1MjY=","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":"If we have to go there, I'd prefer actually not handle `-` at all, seems expensive to have to evaluate `-` in the quosure env, then test it against `base::-` ","created_at":"2018-09-19T13:03:51Z","updated_at":"2018-09-19T13:03:51Z","html_url":"https://github.com/tidyverse/dplyr/pull/3832#discussion_r218793660","pull_request_url":"https://api.github.com/repos/tidyverse/dplyr/pulls/3832","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/tidyverse/dplyr/pulls/comments/218793660"},"html":{"href":"https://github.com/tidyverse/dplyr/pull/3832#discussion_r218793660"},"pull_request":{"href":"https://api.github.com/repos/tidyverse/dplyr/pulls/3832"}},"in_reply_to_id":218291573},"pull_request":{"url":"https://api.github.com/repos/tidyverse/dplyr/pulls/3832","id":215970683,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE1OTcwNjgz","html_url":"https://github.com/tidyverse/dplyr/pull/3832","diff_url":"https://github.com/tidyverse/dplyr/pull/3832.diff","patch_url":"https://github.com/tidyverse/dplyr/pull/3832.patch","issue_url":"https://api.github.com/repos/tidyverse/dplyr/issues/3832","number":3832,"state":"open","locked":false,"title":"Folding of unary `-`","user":{"login":"romainfrancois","id":2625526,"node_id":"MDQ6VXNlcjI2MjU1MjY=","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":"","created_at":"2018-09-17T12:51:25Z","updated_at":"2018-09-19T13:03:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6183b0991b03173da316edca06267492aed1ea6f","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/tidyverse/dplyr/pulls/3832/commits","review_comments_url":"https://api.github.com/repos/tidyverse/dplyr/pulls/3832/comments","review_comment_url":"https://api.github.com/repos/tidyverse/dplyr/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tidyverse/dplyr/issues/3832/comments","statuses_url":"https://api.github.com/repos/tidyverse/dplyr/statuses/21baa5fad37cd51c476cbd50c2e9f6d70c5dc8cc","head":{"label":"tidyverse:f-3820-hybrid-fold-unary-minus","ref":"f-3820-hybrid-fold-unary-minus","sha":"21baa5fad37cd51c476cbd50c2e9f6d70c5dc8cc","user":{"login":"tidyverse","id":22032646,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyMDMyNjQ2","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,"node_id":"MDEwOlJlcG9zaXRvcnk2NDI3ODEz","name":"dplyr","full_name":"tidyverse/dplyr","private":false,"owner":{"login":"tidyverse","id":22032646,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyMDMyNjQ2","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},"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-09-19T08:08:26Z","pushed_at":"2018-09-19T08:50:15Z","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":19910,"stargazers_count":2547,"watchers_count":2547,"language":"R","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":962,"mirror_url":null,"archived":false,"open_issues_count":128,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":962,"open_issues":128,"watchers":2547,"default_branch":"master"}},"base":{"label":"tidyverse:master","ref":"master","sha":"4803fb5f0008a905dbc0c8494576e2fe90a3e6e0","user":{"login":"tidyverse","id":22032646,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyMDMyNjQ2","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,"node_id":"MDEwOlJlcG9zaXRvcnk2NDI3ODEz","name":"dplyr","full_name":"tidyverse/dplyr","private":false,"owner":{"login":"tidyverse","id":22032646,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyMDMyNjQ2","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},"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-09-19T08:08:26Z","pushed_at":"2018-09-19T08:50:15Z","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":19910,"stargazers_count":2547,"watchers_count":2547,"language":"R","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":962,"mirror_url":null,"archived":false,"open_issues_count":128,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":962,"open_issues":128,"watchers":2547,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tidyverse/dplyr/pulls/3832"},"html":{"href":"https://github.com/tidyverse/dplyr/pull/3832"},"issue":{"href":"https://api.github.com/repos/tidyverse/dplyr/issues/3832"},"comments":{"href":"https://api.github.com/repos/tidyverse/dplyr/issues/3832/comments"},"review_comments":{"href":"https://api.github.com/repos/tidyverse/dplyr/pulls/3832/comments"},"review_comment":{"href":"https://api.github.com/repos/tidyverse/dplyr/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tidyverse/dplyr/pulls/3832/commits"},"statuses":{"href":"https://api.github.com/repos/tidyverse/dplyr/statuses/21baa5fad37cd51c476cbd50c2e9f6d70c5dc8cc"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"romainfrancois"}}