{"action":"created","issue":{"url":"https://api.github.com/repos/hadley/dplyr/issues/1021","labels_url":"https://api.github.com/repos/hadley/dplyr/issues/1021/labels{/name}","comments_url":"https://api.github.com/repos/hadley/dplyr/issues/1021/comments","events_url":"https://api.github.com/repos/hadley/dplyr/issues/1021/events","html_url":"https://github.com/hadley/dplyr/issues/1021","id":61360774,"number":1021,"title":"New function idea: add_row()","user":{"login":"smach","id":3394160,"avatar_url":"https://avatars.githubusercontent.com/u/3394160?v=3","gravatar_id":"","url":"https://api.github.com/users/smach","html_url":"https://github.com/smach","followers_url":"https://api.github.com/users/smach/followers","following_url":"https://api.github.com/users/smach/following{/other_user}","gists_url":"https://api.github.com/users/smach/gists{/gist_id}","starred_url":"https://api.github.com/users/smach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smach/subscriptions","organizations_url":"https://api.github.com/users/smach/orgs","repos_url":"https://api.github.com/users/smach/repos","events_url":"https://api.github.com/users/smach/events{/privacy}","received_events_url":"https://api.github.com/users/smach/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/hadley/dplyr/labels/data%20frame","name":"data frame","color":"207de5"},{"url":"https://api.github.com/repos/hadley/dplyr/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/hadley/dplyr/milestones/8","html_url":"https://github.com/hadley/dplyr/milestones/0.5","labels_url":"https://api.github.com/repos/hadley/dplyr/milestones/8/labels","id":766580,"number":8,"title":"0.5","description":"","creator":{"login":"hadley","id":4196,"avatar_url":"https://avatars.githubusercontent.com/u/4196?v=3","gravatar_id":"","url":"https://api.github.com/users/hadley","html_url":"https://github.com/hadley","followers_url":"https://api.github.com/users/hadley/followers","following_url":"https://api.github.com/users/hadley/following{/other_user}","gists_url":"https://api.github.com/users/hadley/gists{/gist_id}","starred_url":"https://api.github.com/users/hadley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hadley/subscriptions","organizations_url":"https://api.github.com/users/hadley/orgs","repos_url":"https://api.github.com/users/hadley/repos","events_url":"https://api.github.com/users/hadley/events{/privacy}","received_events_url":"https://api.github.com/users/hadley/received_events","type":"User","site_admin":false},"open_issues":123,"closed_issues":86,"state":"open","created_at":"2014-08-26T20:16:29Z","updated_at":"2015-10-28T22:53:00Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2015-03-14T02:21:40Z","updated_at":"2015-10-29T12:57:23Z","closed_at":null,"body":"From an exchange on Twitter: An idea for an add_row() function that would make it easy to add a row to a data frame when the columns are of a different class. As you then suggested:\r\n\r\nyou could make it like add_row(mtcars, cyl = 4, disp = 7) and it filled in the other values with missings\r\n\r\nI took a first stab at writing such a function for myself here:\r\n\r\nhttps://github.com/smach/rmiscutils/blob/master/R/add_row.R\r\n\r\nCode that's a bit more elegant and efficient would be a nice addition to dplyr!"},"comment":{"url":"https://api.github.com/repos/hadley/dplyr/issues/comments/152172462","html_url":"https://github.com/hadley/dplyr/issues/1021#issuecomment-152172462","issue_url":"https://api.github.com/repos/hadley/dplyr/issues/1021","id":152172462,"user":{"login":"hadley","id":4196,"avatar_url":"https://avatars.githubusercontent.com/u/4196?v=3","gravatar_id":"","url":"https://api.github.com/users/hadley","html_url":"https://github.com/hadley","followers_url":"https://api.github.com/users/hadley/followers","following_url":"https://api.github.com/users/hadley/following{/other_user}","gists_url":"https://api.github.com/users/hadley/gists{/gist_id}","starred_url":"https://api.github.com/users/hadley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hadley/subscriptions","organizations_url":"https://api.github.com/users/hadley/orgs","repos_url":"https://api.github.com/users/hadley/repos","events_url":"https://api.github.com/users/hadley/events{/privacy}","received_events_url":"https://api.github.com/users/hadley/received_events","type":"User","site_admin":false},"created_at":"2015-10-29T12:57:23Z","updated_at":"2015-10-29T12:57:23Z","body":"To me, silently expanding the levels of a factor just seems like the wrong thing to do - the levels of a factor represent a predefined set of values that you already known."}}