将列表另存为csv

时间:2019-05-17 02:25:29

标签: r

我有一个列表user_complete,其中包含要写入CSV的2个数据帧(带有字符)。我该怎么办?

followers <- list()
user_complete <- list()


for (i in 1:length(names)){
user <- get_followers(names[i], n = 50)
user$University <- names[i]


user_info <- lookup_users(user$user_id)

 user_info$University <- names[i]

user_info <- subset(user_info, select=c("location", "University",        "screen_name"))

user_complete[[i]] <- user_info

}


 write.csv(user_complete, file = "twitterFollowers.csv")

0 个答案:

没有答案