added write.table() to the R code