diff --git a/issuecomp-analysis.R b/issuecomp-analysis.R index 7724579..a9a12be 100644 --- a/issuecomp-analysis.R +++ b/issuecomp-analysis.R @@ -33,9 +33,16 @@ tweets$tags <- "" tagexpand <- c("", "s", "n", "en", "er") -for(d in 1:nrow(issues)) { +# Parallelisation +writeLines(c(""), "log.txt") +cl<-makeCluster(3) +registerDoParallel(cl) + +df<-foreach(d = 1:nrow(issues) %dopar% { +#for(d in 1:nrow(issues)) { # Go through every day curdate <- issues$date[d] + sink("log.txt", append=TRUE) cat(as.character(curdate),"\n") # Put all tweets from specific day in a temporary DF