0

I have Twitter data which looks like

  1. #A #B #C #E
  2. #A #E #F
  3. #E #F .......

and I need to create a co-occurrence matrix with the hashtags.

I tried this code right below(How to use R to create a word co-occurrence matrix)

library(qdapTools)

crossprod(as.matrix(mtabulate(as.data.frame(t(dat[, -1]))))) 

but, it is not working because my data set is really big(about 300,000 tweets). What can I do? (I need a full matrix not just a high frequency words co-occurrence matrix.)

Donald Seinen
  • 3,632
  • 1
  • 7
  • 27
  • What do you mean "does not work because the data set is big"? Did you run into any errors, or is the code running well, but too slow? Also, please add a small sample of what your data looks like, you can do this by running `dput()` – Donald Seinen Oct 20 '21 at 03:34

0 Answers0