R code to read text report