[英]Reading value labels to spss file in R
I use this code to read an spss file: 我用这段代码来读取一个spss文件:
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 在levels<-
(*tmp*
,value = if(nl == nL)as.character(标签)中,否则粘贴0(标签,:不推荐使用因子中的重复级别)
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")
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.