output still has to be directed to correct data frame
This commit is contained in:
@@ -40,7 +40,8 @@ writeLines(c(""), "issuecomp-analysis.log")
|
||||
cl<-makeCluster(3)
|
||||
registerDoParallel(cl)
|
||||
|
||||
df<-foreach(d = 1:nrow(issues), .packages = c("stringr"), .combine=rbind) %dopar% {
|
||||
df<-foreach(d = 1:3, .packages = c("stringr"), .combine=rbind) %dopar% {
|
||||
#df<-foreach(d = 1:nrow(issues), .packages = c("stringr"), .combine=rbind) %dopar% {
|
||||
#for(d in 1:nrow(issues)) {
|
||||
# Go through every day
|
||||
curdate <- issues$date[d]
|
||||
@@ -49,7 +50,8 @@ df<-foreach(d = 1:nrow(issues), .packages = c("stringr"), .combine=rbind) %dopar
|
||||
# Put all tweets from specific day in a temporary DF
|
||||
tweets_curday <- tweets[tweets[, "created_at"] == curdate, ]
|
||||
|
||||
for(t in 1:nrow(tweets_curday)){
|
||||
for(t in 1:25){
|
||||
#for(t in 1:nrow(tweets_curday)){
|
||||
cat(paste("Starting tweet", t, "of",as.character(curdate),"\n"), file="issuecomp-analysis.log", append=TRUE)
|
||||
# Select tweet's text, make it lowercase and remove hashtag indicators (#)
|
||||
curtext <- as.character(tweets_curday$text[t])
|
||||
@@ -110,7 +112,7 @@ df<-foreach(d = 1:nrow(issues), .packages = c("stringr"), .combine=rbind) %dopar
|
||||
|
||||
# Add information to file for function viewPatternMatching
|
||||
write(str_c(curdate,";\"",curid,"\";",curtag), curfile, append = TRUE)
|
||||
cat("Match!\n")
|
||||
cat(paste("Match!\n"), file="issuecomp-analysis.log", append=TRUE)
|
||||
break
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user