Some code to share in R