いくつかのユーザー名の過去100件のツイートを.csvファイルに書き込むための単純なforループがあります。
library(twitteR)
mclist <- read.table('usernames.txt')
for (mc in mclist)
{
tweets <- userTimeline(mc, n = 100)
df <- do.call("rbind", lapply(tweets, as.data.frame))
write.csv(df, file=paste("Desktop/", mc, ".csv", sep = ""), row.names = F)
}
StackOverflowで読んだ内容をほぼフォローしましたが、引き続き次のエラーメッセージが表示されます。
Error in file(file, ifelse(append, "a", "w")) :
invalid 'description' argument
In addition: Warning message:
In if (file == "") file <- stdout() else if (is.character(file)) { :
the condition has length > 1 and only the first element will be used
どこで私は間違えましたか?