{"action":"created","issue":{"url":"https://api.github.com/repos/hadley/dplyr/issues/1097","labels_url":"https://api.github.com/repos/hadley/dplyr/issues/1097/labels{/name}","comments_url":"https://api.github.com/repos/hadley/dplyr/issues/1097/comments","events_url":"https://api.github.com/repos/hadley/dplyr/issues/1097/events","html_url":"https://github.com/hadley/dplyr/pull/1097","id":70325655,"number":1097,"title":"add mechanism for explicit recycling of columns (#1093)","user":{"login":"kevinushey","id":1976582,"avatar_url":"https://avatars.githubusercontent.com/u/1976582?v=3","gravatar_id":"","url":"https://api.github.com/users/kevinushey","html_url":"https://github.com/kevinushey","followers_url":"https://api.github.com/users/kevinushey/followers","following_url":"https://api.github.com/users/kevinushey/following{/other_user}","gists_url":"https://api.github.com/users/kevinushey/gists{/gist_id}","starred_url":"https://api.github.com/users/kevinushey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevinushey/subscriptions","organizations_url":"https://api.github.com/users/kevinushey/orgs","repos_url":"https://api.github.com/users/kevinushey/repos","events_url":"https://api.github.com/users/kevinushey/events{/privacy}","received_events_url":"https://api.github.com/users/kevinushey/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-04-23T06:35:46Z","updated_at":"2015-05-04T20:30:53Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/hadley/dplyr/pulls/1097","html_url":"https://github.com/hadley/dplyr/pull/1097","diff_url":"https://github.com/hadley/dplyr/pull/1097.diff","patch_url":"https://github.com/hadley/dplyr/pull/1097.patch"},"body":"This PR adds `recycle_each`, and `recycle_whole`, as wrappers over their corresponding `rep` counterparts. A bit of non-standard evaluation sugar is used in `data_frame` to fill in the output length based on the actual resulting number of rows.\r\n\r\nThe net result is that things like this work:\r\n\r\n    data_frame(x = 1:10, y = recycle_each(1:2), z = recycle_whole(c('a', 'b')))\r\n\r\nOne limitation is that recycled vectors cannot depend on non-recycled vectors, and vice versa. This is a bit of a 'chicken and egg' problem -- in order to recycle a vector, we need to know the number of rows. To figure that out, we need to evaluate every non-recycled vector in the `data_frame` call. And so that evaluation can't depend on evaluation of a `recycle` vector."},"comment":{"url":"https://api.github.com/repos/hadley/dplyr/issues/comments/98842580","html_url":"https://github.com/hadley/dplyr/pull/1097#issuecomment-98842580","issue_url":"https://api.github.com/repos/hadley/dplyr/issues/1097","id":98842580,"user":{"login":"kevinushey","id":1976582,"avatar_url":"https://avatars.githubusercontent.com/u/1976582?v=3","gravatar_id":"","url":"https://api.github.com/users/kevinushey","html_url":"https://github.com/kevinushey","followers_url":"https://api.github.com/users/kevinushey/followers","following_url":"https://api.github.com/users/kevinushey/following{/other_user}","gists_url":"https://api.github.com/users/kevinushey/gists{/gist_id}","starred_url":"https://api.github.com/users/kevinushey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevinushey/subscriptions","organizations_url":"https://api.github.com/users/kevinushey/orgs","repos_url":"https://api.github.com/users/kevinushey/repos","events_url":"https://api.github.com/users/kevinushey/events{/privacy}","received_events_url":"https://api.github.com/users/kevinushey/received_events","type":"User","site_admin":false},"created_at":"2015-05-04T20:30:53Z","updated_at":"2015-05-04T20:30:53Z","body":"Looks good now. What do you think, @hadley?"}}