Updated R script documentation