My question is about text mining, and text processing. I would like to build a co-occurrence matrix from my data. My data is:
dat <- read.table(text="id_reférence id_paper
        621107   621100
        621100   621101
        621107   621102
        621109   621103
        621105   621104
        621103   621105
        621109   621106
        621106   621107
        621107   621108
        621106   621109", header=T)
expected <- matrix(0,10,10)
### Article 1 has been cited by article 2
expected[2, 1] <- 1
Thanks in advance :)
 
     
    