R code to process GC data