I have a database that contains consumption information per animal and per day. However the animals entered on different days in the experiment. Initially I need to have all animals start counting the days in experiment from 1. Follow part of the base
Animal Dia Consumo
5 9 2533.96
5 10 2329.06
5 11 2943.79
5 12 3361.62
5 13 2890.82
5 14 2538.98
5 15 2978.81
5 16 3038.76
5 17 3038.76
6 10 2314.82
6 11 2434.75
6 12 2643.99
6 13 2320.58
6 14 2439.56
6 15 2139.6
6 16 2459.54
6 17 2339.59
After this unique numbering for all animals, I need to calculate the mean consumption and standard deviation of all animals each day.