{"action":"opened","issue":{"url":"https://api.github.com/repos/hadley/dplyr/issues/2017","repository_url":"https://api.github.com/repos/hadley/dplyr","labels_url":"https://api.github.com/repos/hadley/dplyr/issues/2017/labels{/name}","comments_url":"https://api.github.com/repos/hadley/dplyr/issues/2017/comments","events_url":"https://api.github.com/repos/hadley/dplyr/issues/2017/events","html_url":"https://github.com/hadley/dplyr/issues/2017","id":165515166,"number":2017,"title":"convert_class - the missing function","user":{"login":"ikashnitsky","id":10271163,"avatar_url":"https://avatars.githubusercontent.com/u/10271163?v=3","gravatar_id":"","url":"https://api.github.com/users/ikashnitsky","html_url":"https://github.com/ikashnitsky","followers_url":"https://api.github.com/users/ikashnitsky/followers","following_url":"https://api.github.com/users/ikashnitsky/following{/other_user}","gists_url":"https://api.github.com/users/ikashnitsky/gists{/gist_id}","starred_url":"https://api.github.com/users/ikashnitsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ikashnitsky/subscriptions","organizations_url":"https://api.github.com/users/ikashnitsky/orgs","repos_url":"https://api.github.com/users/ikashnitsky/repos","events_url":"https://api.github.com/users/ikashnitsky/events{/privacy}","received_events_url":"https://api.github.com/users/ikashnitsky/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-07-14T09:16:34Z","updated_at":"2016-07-14T09:16:34Z","closed_at":null,"body":"As far as I know, there is no perfect way to deal with classes of multiple variables of a dataframe easily. Just check the [variety of options at SO](http://stackexchange.com/search?q=%5Br%5D+class+for+multiple+columns). \r\nThe ideal function I'm looking for would work like this.\r\n```\r\ndf_converted <- df_init %>% convert_class(factor = 1:4, \r\n                                          character = c(\"Name\",\"Brand\"), \r\n                                          numeric = c(12,14,28))\r\n```\r\nSo, the idea is that you can easily assign what format you prefer for specific columns. \r\nDoes it make sense?"}}
{"actor":{"display_login":"ikashnitsky"}}