R Under development (unstable) (2013-01-01 r61505) -- "Unsuffered Consequences" Copyright (C) 2013 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: x86_64-apple-darwin11.4.2/x86_64 (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(foreign) > > mydata <- read.spss("mval_bug.sav", use.value.labels = TRUE, + to.data.frame = TRUE, use.missings = TRUE) re-encoding from latin1 Warning message: In read.spss("mval_bug.sav", use.value.labels = TRUE, to.data.frame = TRUE, : mval_bug.sav: Unrecognized record type 7, subtype 18 encountered in system file > > levels(mydata$Q1_MISSING_NONE) [1] "(-3) Missing" "(-2) Don't know" [3] "(-1) Refused" "(1) Approve STRONGLY" [5] "(2) Approve SOMEWHAT" "(3) Disapprove SOMEWHAT" [7] "(4) Disapprove STRONGLY" "(99) Coding error" > table(mydata$Q1_MISSING_NONE) (-3) Missing (-2) Don't know (-1) Refused 17 8 5 (1) Approve STRONGLY (2) Approve SOMEWHAT (3) Disapprove SOMEWHAT 142 104 71 (4) Disapprove STRONGLY (99) Coding error 250 3 > > levels(mydata$Q1_MISSING_1) [1] "(-3) Missing" "(-2) Don't know" [3] "(1) Approve STRONGLY" "(2) Approve SOMEWHAT" [5] "(3) Disapprove SOMEWHAT" "(4) Disapprove STRONGLY" [7] "(99) Coding error" > table(mydata$Q1_MISSING_1) (-3) Missing (-2) Don't know (1) Approve STRONGLY 17 8 142 (2) Approve SOMEWHAT (3) Disapprove SOMEWHAT (4) Disapprove STRONGLY 104 71 250 (99) Coding error 3 > > levels(mydata$Q1_MISSING_2) [1] "(-3) Missing" "(1) Approve STRONGLY" [3] "(2) Approve SOMEWHAT" "(3) Disapprove SOMEWHAT" [5] "(4) Disapprove STRONGLY" "(99) Coding error" > table(mydata$Q1_MISSING_2) (-3) Missing (1) Approve STRONGLY (2) Approve SOMEWHAT 17 142 104 (3) Disapprove SOMEWHAT (4) Disapprove STRONGLY (99) Coding error 71 250 3 > > levels(mydata$Q1_MISSING_3) [1] "(1) Approve STRONGLY" "(2) Approve SOMEWHAT" [3] "(3) Disapprove SOMEWHAT" "(4) Disapprove STRONGLY" [5] "(99) Coding error" > table(mydata$Q1_MISSING_3) (1) Approve STRONGLY (2) Approve SOMEWHAT (3) Disapprove SOMEWHAT 142 104 71 (4) Disapprove STRONGLY (99) Coding error 250 3 > > levels(mydata$Q1_MISSING_RANGE) [1] "(1) Approve STRONGLY" "(2) Approve SOMEWHAT" [3] "(3) Disapprove SOMEWHAT" "(4) Disapprove STRONGLY" [5] "(99) Coding error" > table(mydata$Q1_MISSING_RANGE) (1) Approve STRONGLY (2) Approve SOMEWHAT (3) Disapprove SOMEWHAT 142 104 71 (4) Disapprove STRONGLY (99) Coding error 250 3 > > levels(mydata$Q1_MISSING_LOW) [1] "(1) Approve STRONGLY" "(2) Approve SOMEWHAT" [3] "(3) Disapprove SOMEWHAT" "(4) Disapprove STRONGLY" [5] "(99) Coding error" > table(mydata$Q1_MISSING_LOW) (1) Approve STRONGLY (2) Approve SOMEWHAT (3) Disapprove SOMEWHAT 142 104 71 (4) Disapprove STRONGLY (99) Coding error 250 3 > > levels(mydata$Q1_MISSING_HIGH) [1] "(-1) Coding error" "(1) Approve STRONGLY" [3] "(2) Approve SOMEWHAT" "(3) Disapprove SOMEWHAT" [5] "(4) Disapprove STRONGLY" > table(mydata$Q1_MISSING_HIGH) (-1) Coding error (1) Approve STRONGLY (2) Approve SOMEWHAT 3 142 104 (3) Disapprove SOMEWHAT (4) Disapprove STRONGLY 71 250 > > levels(mydata$Q1_MISSING_RANGE_1) [1] "(1) Approve STRONGLY" "(2) Approve SOMEWHAT" [3] "(3) Disapprove SOMEWHAT" "(4) Disapprove STRONGLY" > table(mydata$Q1_MISSING_RANGE_1) (1) Approve STRONGLY (2) Approve SOMEWHAT (3) Disapprove SOMEWHAT 142 104 71 (4) Disapprove STRONGLY 250 > > levels(mydata$Q1_MISSING_LOW_1) [1] "(1) Approve STRONGLY" "(2) Approve SOMEWHAT" [3] "(3) Disapprove SOMEWHAT" "(4) Disapprove STRONGLY" > table(mydata$Q1_MISSING_LOW_1) (1) Approve STRONGLY (2) Approve SOMEWHAT (3) Disapprove SOMEWHAT 142 104 71 (4) Disapprove STRONGLY 250 > > levels(mydata$Q1_MISSING_HIGH_1) [1] "(1) Approve STRONGLY" "(2) Approve SOMEWHAT" [3] "(3) Disapprove SOMEWHAT" "(4) Disapprove STRONGLY" > table(mydata$Q1_MISSING_HIGH_1) (1) Approve STRONGLY (2) Approve SOMEWHAT (3) Disapprove SOMEWHAT 142 104 71 (4) Disapprove STRONGLY 250 > > proc.time() user system elapsed 0.284 0.029 0.300