R Programming course assignment