emoji.frequency <- matrix(NA, nrow = nrow(ds), ncol = nrow(emoticons))
for(i in 1:nrow(emoticons)){
emoji.frequency[,i] <- regexpr(emoticons$bytes[i],ds$text, useBytes = T )
}
emoji.per.tweet <- rowSums(emoji.frequency > -1)
emoji.indexes <- which( emoji.per.tweet > 0)
emoji.ds <- NULL
for(i in emoji.indexes){
valid.cols <- which(emoji.frequency[i,]>-1)
for(j in valid.cols){
emoji.ds <- rbind(cbind(ds[i,], emoticons[j,]), emoji.ds)
}
}
Count | Img | Unicode | Desc |
---|---|---|---|
1085 | U+1F602 | face with tears of joy | |
519 | U+1F629 | weary face | |
430 | U+1F62D | loudly crying face | |
402 | U+1F60D | smiling face with heart-shaped eyes |