Second R programming assignment