I am trying to figure out how to calculate the means of my data frame using a for loop. I know you can simply do this with the aggregate function but I also need to know how to