139 lines
5.5 KiB
Plaintext
139 lines
5.5 KiB
Plaintext
|
|
R Under development (unstable) (2017-11-28 r73785) -- "Unsuffered Consequences"
|
|
Copyright (C) 2017 The R Foundation for Statistical Computing
|
|
Platform: x86_64-apple-darwin17.2.0 (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 <- suppressMessages(read.spss("mval_bug.sav", use.value.labels = TRUE,
|
|
+ to.data.frame = TRUE, use.missings = TRUE))
|
|
>
|
|
> 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.178 0.035 0.196
|