Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 201894

Read SPSS file into R, the data format for date is wrong, and generate more variable

$
0
0

I have tried using spss.get from Hmisc. Here is my code:

    install.packages("Hmisc")
    library(Hmisc)
    mydata <- spss.get("C:\\good good study\\comscore\\purchase.sav", use.value.labels = TRUE)

the output is shown with warning message which is as follows:

> mydata <- spss.get("C:\\good good study\\comscore\\purchase.sav", use.value.labels = TRUE)
Warning messages:
1: In read.spss(file, use.value.labels = use.value.labels, to.data.frame = to.data.frame,  :
C:\good good study\comscore\purchase.sav: Unrecognized record type 7, subtype 14 encountered in system file
2: In read.spss(file, use.value.labels = use.value.labels, to.data.frame = to.data.frame,  :
C:\good good study\comscore\purchase.sav: Unrecognized record type 7, subtype 18 encountered in system file

My initial date in spss is as follow: date in spss is correct

However, when I use spss.get in R, the data for date becomes garbled: date become garbled in R


Viewing all articles
Browse latest Browse all 201894

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>