R programming exercises