在导出数据时报错:
> write.csv(a,"a.csv")
Error in write.table(a, "a.csv", col.names = NA, sep = ",", dec =".", : unimplemented type 'list' in 'EncodeElement' .
查看数据结构发现有list的成分
所以将其unlist后重新合并
b<-data.frame(c(unlist(a$name)),c(unlist(a$type)))> write.csv(b,"b.csv")
或者
for (i in 1:nrow(inter)) inter[i,'values'] <- paste(inter[[i,'..values..']], collapse = ', ')
inter <- inter[,-4]
问题解决