I have a large data.frame. The data.frame include a lot of values.
For example:
df <- data.frame(Company = c(\'A\', \'A\', \'B\', \'C\', \'A\', \'
Just use the "aggregate" function
aggregate(x = df[c("Age","Wages","Education.University","Productivity")], by = df[c("Company")], FUN = mean)
# Company Age Wages Education.University Productivity
#1 A 27.00000 56666.67 0.6666667 102.6667
#2 B 28.66667 68333.33 1.0000000 111.6667
#3 C 29.00000 53333.33 0.3333333 101.6667