R script to read the GRM