add some notes for R code