{"action":"created","issue":{"url":"https://api.github.com/repos/hadley/haven/issues/4","labels_url":"https://api.github.com/repos/hadley/haven/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/hadley/haven/issues/4/comments","events_url":"https://api.github.com/repos/hadley/haven/issues/4/events","html_url":"https://github.com/hadley/haven/issues/4","id":56675080,"number":4,"title":"Include variable and value labels of importet data","user":{"login":"sjPlot","id":4901179,"avatar_url":"https://avatars.githubusercontent.com/u/4901179?v=3","gravatar_id":"","url":"https://api.github.com/users/sjPlot","html_url":"https://github.com/sjPlot","followers_url":"https://api.github.com/users/sjPlot/followers","following_url":"https://api.github.com/users/sjPlot/following{/other_user}","gists_url":"https://api.github.com/users/sjPlot/gists{/gist_id}","starred_url":"https://api.github.com/users/sjPlot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sjPlot/subscriptions","organizations_url":"https://api.github.com/users/sjPlot/orgs","repos_url":"https://api.github.com/users/sjPlot/repos","events_url":"https://api.github.com/users/sjPlot/events{/privacy}","received_events_url":"https://api.github.com/users/sjPlot/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-02-05T14:15:00Z","updated_at":"2015-02-05T14:20:59Z","closed_at":null,"body":"It would be nice if value and variable labels would be imported as well, e.g. by setting them as data frame attributes (like `read.spss` from `foreign` package does):\r\n\r\n***Example of read.spss***\r\n\r\n'data.frame':\t908 obs. of  26 variables:\r\n $ c12hour : num  16 148 70 168 168 16 161 110 28 40 ...\r\n $ e15relat: atomic  2 2 1 1 2 2 1 4 2 2 ...\r\n  ..- attr(*, \"value.labels\")= Named chr  \"8\" \"7\" \"6\" \"5\" ...\r\n  .. ..- attr(*, \"names\")= chr  \"other, specify\" \"cousin\" \"nephew/niece\" \"ancle/aunt\" ...\r\n $ e16sex  : atomic  2 2 2 2 2 2 1 2 2 2 ...\r\n  ..- attr(*, \"value.labels\")= Named chr  \"2\" \"1\"\r\n  .. ..- attr(*, \"names\")= chr  \"female\" \"male\"\r\n $ e17age  : num  83 88 82 67 84 85 74 87 79 83 ...\r\n $ e42dep  : atomic  3 3 3 4 4 4 4 4 4 4 ...\r\n  ..- attr(*, \"value.labels\")= Named chr  \"4\" \"3\" \"2\" \"1\"\r\n  .. ..- attr(*, \"names\")= chr  \"severely dependent\" \"moderately dependent\" \"slightly dependent\" \"independent\"\r\n $ c82cop1 : atomic  3 3 2 4 3 2 4 3 3 3 ...\r\n  ..- attr(*, \"value.labels\")= Named chr  \"4\" \"3\" \"2\" \"1\"\r\n  .. ..- attr(*, \"names\")= chr  \"always\" \"often\" \"sometimes\" \"never\"\r\n $ c83cop2 : atomic  2 3 2 1 2 2 2 2 2 2 ...\r\n  ..- attr(*, \"value.labels\")= Named chr  \"4\" \"3\" \"2\" \"1\"\r\n  .. ..- attr(*, \"names\")= chr  \"Always\" \"Often\" \"Sometimes\" \"Never\"\r\n $ c84cop3 : atomic  2 3 1 3 1 3 4 2 3 1 ...\r\n  ..- attr(*, \"value.labels\")= Named chr  \"4\" \"3\" \"2\" \"1\"\r\n  .. ..- attr(*, \"names\")= chr  \"Always\" \"Often\" \"Sometimes\" \"Never\"\r\n $ c85cop4 : atomic  2 3 4 1 2 3 1 1 2 2 ...\r\n  ..- attr(*, \"value.labels\")= Named chr  \"4\" \"3\" \"2\" \"1\"\r\n  .. ..- attr(*, \"names\")= chr  \"Always\" \"Often\" \"Sometimes\" \"Never\"\r\n $ c86cop5 : atomic  1 4 1 1 2 3 1 1 2 1 ...\r\n  ..- attr(*, \"value.labels\")= Named chr  \"4\" \"3\" \"2\" \"1\"\r\n  .. ..- attr(*, \"names\")= chr  \"Always\" \"Often\" \"Sometimes\" \"Never\"\r\n $ c87cop6 : atomic  1 1 1 1 2 2 2 1 1 1 ...\r\n  ..- attr(*, \"value.labels\")= Named chr  \"4\" \"3\" \"2\" \"1\"\r\n  .. ..- attr(*, \"names\")= chr  \"Always\" \"Often\" \"Sometimes\" \"Never\"\r\n $ c88cop7 : atomic  2 3 1 1 1 2 4 2 3 1 ...\r\n  ..- attr(*, \"value.labels\")= Named chr  \"4\" \"3\" \"2\" \"1\"\r\n  .. ..- attr(*, \"names\")= chr  \"Always\" \"Often\" \"Sometimes\" \"Never\"\r\n $ c89cop8 : atomic  3 2 4 2 4 1 1 3 1 1 ...\r\n  ..- attr(*, \"value.labels\")= Named chr  \"4\" \"3\" \"2\" \"1\"\r\n  .. ..- attr(*, \"names\")= chr  \"always\" \"often\" \"sometimes\" \"never\"\r\n $ c90cop9 : atomic  3 2 3 4 4 1 4 3 3 3 ...\r\n  ..- attr(*, \"value.labels\")= Named chr  \"4\" \"3\" \"2\" \"1\"\r\n  .. ..- attr(*, \"names\")= chr  \"always\" \"often\" \"sometimes\" \"never\"\r\n $ c160age : num  56 54 80 69 47 56 61 67 59 49 ...\r\n $ c161sex : atomic  2 2 1 1 2 1 2 2 2 2 ...\r\n  ..- attr(*, \"value.labels\")= Named chr  \"2\" \"1\"\r\n  .. ..- attr(*, \"names\")= chr  \"Female\" \"Male\"\r\n $ c172code: atomic  2 2 1 2 2 2 2 2 NA 2 ...\r\n  ..- attr(*, \"value.labels\")= Named chr  \"3\" \"2\" \"1\"\r\n  .. ..- attr(*, \"names\")= chr  \"high level of education\" \"intermediate level of education\" \"low level of education\"\r\n $ c175empl: atomic  1 1 0 0 0 1 0 0 0 0 ...\r\n  ..- attr(*, \"value.labels\")= Named chr  \"1\" \"0\"\r\n  .. ..- attr(*, \"names\")= chr  \"yes\" \"no\"\r\n $ barthtot: num  75 75 35 0 25 60 5 35 15 0 ...\r\n $ neg_c_7 : num  12 20 11 10 12 19 15 11 15 10 ...\r\n $ pos_v_4 : num  12 11 13 15 15 9 13 14 13 13 ...\r\n $ quol_5  : num  14 10 7 12 19 8 20 20 8 15 ...\r\n $ resttotn: num  0 4 0 2 2 1 0 0 0 1 ...\r\n $ tot_sc_e: num  4 0 1 0 1 3 0 1 2 1 ...\r\n $ n4pstu  : atomic  0 0 2 3 2 2 3 1 3 3 ...\r\n  ..- attr(*, \"value.labels\")= Named chr  \"8\" \"7\" \"6\" \"5\" ...\r\n  .. ..- attr(*, \"names\")= chr  \"other, specify\" \"cousin\" \"nephew/niece\" \"ancle/aunt\" ...\r\n $ nur_pst : atomic  NA NA 2 3 2 2 3 1 3 3 ...\r\n  ..- attr(*, \"value.labels\")= Named chr  \"89\" \"88\" \"87\" \"86\" ...\r\n  .. ..- attr(*, \"names\")= chr  \"other\" \"co-religionist\" \"volunteer\" \"neighbour\" ...\r\n - attr(*, \"variable.labels\")= Named chr  \"average number of hours of care for the elder in a week\" \"relationship to elder\" \"elder's gender\" \"elder' age\" ...\r\n  ..- attr(*, \"names\")= chr  \"c12hour\" \"e15relat\" \"e16sex\" \"e17age\" ...\r\n - attr(*, \"codepage\")= int 65001\r\n\r\n\r\n***Same with haven***\r\n\r\nClasses ‘tbl_df’, ‘tbl’ and 'data.frame':\t908 obs. of  26 variables:\r\n $ c12hour : num  16 148 70 168 168 16 161 110 28 40 ...\r\n $ e15relat: num  2 2 1 1 2 2 1 4 2 2 ...\r\n $ e16sex  : num  2 2 2 2 2 2 1 2 2 2 ...\r\n $ e17age  : num  83 88 82 67 84 85 74 87 79 83 ...\r\n $ e42dep  : num  3 3 3 4 4 4 4 4 4 4 ...\r\n $ c82cop1 : num  3 3 2 4 3 2 4 3 3 3 ...\r\n $ c83cop2 : num  2 3 2 1 2 2 2 2 2 2 ...\r\n $ c84cop3 : num  2 3 1 3 1 3 4 2 3 1 ...\r\n $ c85cop4 : num  2 3 4 1 2 3 1 1 2 2 ...\r\n $ c86cop5 : num  1 4 1 1 2 3 1 1 2 1 ...\r\n $ c87cop6 : num  1 1 1 1 2 2 2 1 1 1 ...\r\n $ c88cop7 : num  2 3 1 1 1 2 4 2 3 1 ...\r\n $ c89cop8 : num  3 2 4 2 4 1 1 3 1 1 ...\r\n $ c90cop9 : num  3 2 3 4 4 1 4 3 3 3 ...\r\n $ c160age : num  56 54 80 69 47 56 61 67 59 49 ...\r\n $ c161sex : num  2 2 1 1 2 1 2 2 2 2 ...\r\n $ c172code: num  2 2 1 2 2 2 2 2 NaN 2 ...\r\n $ c175empl: num  1 1 0 0 0 1 0 0 0 0 ...\r\n $ barthtot: num  75 75 35 0 25 60 5 35 15 0 ...\r\n $ neg_c_7 : num  12 20 11 10 12 19 15 11 15 10 ...\r\n $ pos_v_4 : num  12 11 13 15 15 9 13 14 13 13 ...\r\n $ quol_5  : num  14 10 7 12 19 8 20 20 8 15 ...\r\n $ resttotn: num  0 4 0 2 2 1 0 0 0 1 ...\r\n $ tot_sc_e: num  4 0 1 0 1 3 0 1 2 1 ...\r\n $ n4pstu  : num  0 0 2 3 2 2 3 1 3 3 ...\r\n $ nur_pst : num  NaN NaN 2 3 2 2 3 1 3 3 ...\r\n"},"comment":{"url":"https://api.github.com/repos/hadley/haven/issues/comments/73052930","html_url":"https://github.com/hadley/haven/issues/4#issuecomment-73052930","issue_url":"https://api.github.com/repos/hadley/haven/issues/4","id":73052930,"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-02-05T14:20:59Z","updated_at":"2015-02-05T14:20:59Z","body":"Shouldn't (e.g.) `n4pstu` be a factor?"}}