Update R code V 0.1