R Programming Assignment Code