I want to create a variable avgcal for a specific brand which gives the average of calories of all other brands:
Brand name Calories
Cornflakes 100
Rice krispies 50
Frosted flake 120
So for cornflakes, i should get (50+120)/2, for rice krispies (100+120))/2 and for frosted flake (100+50)/2. I need a command that will generate a column with these numbers for all the brands. Please help.
Brand name Calories
Cornflakes 100
Rice krispies 50
Frosted flake 120
So for cornflakes, i should get (50+120)/2, for rice krispies (100+120))/2 and for frosted flake (100+50)/2. I need a command that will generate a column with these numbers for all the brands. Please help.
Comment