{"action":"created","issue":{"url":"https://api.github.com/repos/hadley/haven/issues/33","labels_url":"https://api.github.com/repos/hadley/haven/issues/33/labels{/name}","comments_url":"https://api.github.com/repos/hadley/haven/issues/33/comments","events_url":"https://api.github.com/repos/hadley/haven/issues/33/events","html_url":"https://github.com/hadley/haven/issues/33","id":59651787,"number":33,"title":"read_spss() imports value labels for multiple declared missings","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":29,"created_at":"2015-03-03T14:50:43Z","updated_at":"2015-07-04T06:39:20Z","closed_at":null,"body":"In SPSS, you can assign multiple missing values, e.g. \"8\" as \"not applicable\" or \"9\" for \"real missing\". `read_spss()` would set both 8 and 9 to `NA` in the imported data.frame, however, if a value label for \"8\" is set, it is also imported - thus, you have one more value label than values.\r\n\r\nExample:\r\n\r\n\"Do you live in partnership?\"\r\n\r\n1 - yes\r\n2 - no\r\n8 - not applicable (was asked before if married) -> declared as \"8\" missing\r\n9 - missing -> declared as \"9\" missing, but not labelled\r\n\r\nNow read_spss() imports this as vector with two values (1/2) and NA's, but three value labels (yes/no/not applicable).\r\n\r\nThis is no serious bug, but I wonder if it would be possible to distinguish whether an SPSS-declared \"missing value\" is either a \"real\" missing or a \"not applicable\" declared missing. In SPSS you do this e.g. to get valid frequency counts for yes/no answers, but still having the information how much \"real\" missings you have..."},"comment":{"url":"https://api.github.com/repos/hadley/haven/issues/comments/118470934","html_url":"https://github.com/hadley/haven/issues/33#issuecomment-118470934","issue_url":"https://api.github.com/repos/hadley/haven/issues/33","id":118470934,"user":{"login":"larmarange","id":966307,"avatar_url":"https://avatars.githubusercontent.com/u/966307?v=3","gravatar_id":"","url":"https://api.github.com/users/larmarange","html_url":"https://github.com/larmarange","followers_url":"https://api.github.com/users/larmarange/followers","following_url":"https://api.github.com/users/larmarange/following{/other_user}","gists_url":"https://api.github.com/users/larmarange/gists{/gist_id}","starred_url":"https://api.github.com/users/larmarange/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/larmarange/subscriptions","organizations_url":"https://api.github.com/users/larmarange/orgs","repos_url":"https://api.github.com/users/larmarange/repos","events_url":"https://api.github.com/users/larmarange/events{/privacy}","received_events_url":"https://api.github.com/users/larmarange/received_events","type":"User","site_admin":false},"created_at":"2015-07-04T06:39:20Z","updated_at":"2015-07-04T06:39:20Z","body":"In all cases, whatever the solution implemented in `haven`, it would be at least useful to have in `read_spss` an option equivalent to `use.missings` in `read.spss` from `foreign`, i.e. letting the user decide if user-defined missing values in the SPSS file should be converted to `NA` or not"}}