R Script

 final version