Practice functions on R programming