Question: region_with_max_mean
region_with_max_mean <- names(tapply(data$Total, data$Region, mean))[which.max(tapply(data$Total, data$Region, mean))] make it short
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
