简体   繁体   中英

Reading value labels to spss file in R

I use this code to read an spss file:

dt<-read.spss("dt.sav",to.data.frame = TRUE,use.value.labels = TRUE)

But I got this error:

Warning message:

In levels<- ( *tmp* , value = if (nl == nL) as.character(labels) else paste0(labels, : duplicated levels in factors are deprecated

I didn't find anything about it. Could anyone help me?

According to the error message, it seems that you have duplicated factors.

You should use:

dt<-read.spss("dt.sav",to.data.frame = TRUE,use.value.labels = TRUE,duplicated.value.labels="append")

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM