Co-occurrence R script