readme and comments in R file

readme and comments in R file