This commit is contained in:
2014-12-07 12:06:09 +01:00
parent c296884028
commit 39571e0890
10 changed files with 310 additions and 109286 deletions
+3 -3
View File
@@ -52,7 +52,7 @@ keep <- c("created_at", "id_str", "text", "retweet_count")
tweets_full <- data.frame(user=character(), name=character(), created_at=character(), id_str=character(), text=character(), retweet_count=character())
tweets_complete <- tweets_full
for(a in 94:nrow(acc_df)) {
for(a in 346:nrow(acc_df)) {
user <- as.character(acc_df$screenname[a])
name <- as.character(acc_df$name[a])
max_id <- "999999999999999999"
@@ -84,7 +84,7 @@ for(a in 94:nrow(acc_df)) {
# Check if error code exists
code <- errorCheckCode(tweets_temp) # 0 if no error
if(code == 34) { # page does not exist
status <- errorCode34
status <- errorCode34()
if(status == 1) { Sys.sleep(3);error <- error + 1;next}
if(status == 2) {break}
}
@@ -164,7 +164,7 @@ for(a in 94:nrow(acc_df)) {
write.csv(tweets_complete, "tweets_complete.csv")
# Every tweet from 2014 from user[r] is downloaded. Now next user in for-loop
# Every tweet from 2014 from user[a] is downloaded. Now next user in for-loop
}