R programming homework2