我开始在使用 twitteR 包提取推文时遇到问题:我不再在输出中获得“位置”(在用户个人资料中说明),我需要它进行进一步分析。我使用与以前完全相同的代码。任何人都可以帮忙吗?
TweetFrame <- function(searchTerm, maxTweets)
{
tweetList <- searchTwitter(searchTerm, n = maxTweets, lang = "en")
tweetDF <- do.call("rbind", lapply(tweetList, as.data.frame))
return(tweetDF[order(as.integer(tweetDF$created)), ])
}
tweetDF <-
TweetFrame("#climate OR climate change OR global warming", 20)
之前我会得到一个包含 20 个对象和 19 个变量的数据框,但现在它只返回 16 个变量。