Statistical Average issues with R

I think we need to see your code and a bit of sample data.