Skip to content

Aggregating data (with more than one function)

1 message · Liaw, Andy

#
+                function(x) c(mean=mean(x), total=sum(x))))
dept     mean  total
Finance Finance 83925.67 251777
HR           HR 63333.33 190000
IT           IT 59928.67 179786
Sales     Sales 62481.67 187445

Andy