R Programming Assignment Two, done by Amy Jiang