Homework for R Programming class