{"action":"opened","issue":{"url":"https://api.github.com/repos/hadley/haven/issues/39","labels_url":"https://api.github.com/repos/hadley/haven/issues/39/labels{/name}","comments_url":"https://api.github.com/repos/hadley/haven/issues/39/comments","events_url":"https://api.github.com/repos/hadley/haven/issues/39/events","html_url":"https://github.com/hadley/haven/issues/39","id":60039205,"number":39,"title":"labels versus format","user":{"login":"bethatkinson","id":11338615,"avatar_url":"https://avatars.githubusercontent.com/u/11338615?v=3","gravatar_id":"","url":"https://api.github.com/users/bethatkinson","html_url":"https://github.com/bethatkinson","followers_url":"https://api.github.com/users/bethatkinson/followers","following_url":"https://api.github.com/users/bethatkinson/following{/other_user}","gists_url":"https://api.github.com/users/bethatkinson/gists{/gist_id}","starred_url":"https://api.github.com/users/bethatkinson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bethatkinson/subscriptions","organizations_url":"https://api.github.com/users/bethatkinson/orgs","repos_url":"https://api.github.com/users/bethatkinson/repos","events_url":"https://api.github.com/users/bethatkinson/events{/privacy}","received_events_url":"https://api.github.com/users/bethatkinson/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-03-06T00:19:03Z","updated_at":"2015-03-06T00:19:03Z","closed_at":null,"body":"Not a bug - just a comment that I found the labelled function a bit confusing because of the name.  So “labelled” is similar to a SAS format, versus a SAS “label”, which I was happy to see does still come across.  Both are useful concepts and it would really be nice to have both supported.  \r\n\r\nAlso, I noticed with subsetting the data that the “label” attribute is lost but not the “labels” attribute.    Any chance of adding in the “label” concept somehow?   It would be nice to not lose that information and it would be nice to have a wrapper function that adds/extracts the information.\r\n\r\nThanks for the consideration.  \r\n\r\n<pre><code>\r\nd2$death <- labelled(d2$status, labels=c(Censored=0, Dead=1))\r\nattributes(d2$death)\r\n$label\r\n[1] \"Vital Status\"\r\n$labels\r\nCensored     Dead \r\n       0        1 \r\n$class\r\n[1] \"labelled\"\r\n</pre></code>"}}