R-programming code