DDD <- summarise(
group_by(Customers, Last_region, Last_state, Last_city),
Count = length(Last_city),
Total = sum(Customer.Value, na.rm = TRUE),
Percent = sum(Customer.Value * 100 / sum(Customer.Value, na.rm = TRUE)))
我已经尝试过这段代码。我得到了总和计数的分组,但不是百分比?