R Programming - The second programming assignment