Now the problem that the table command has is that it only gives you a count. For getting mean or sum or standard deviation we need to use another function called tapply. tapply is very similar to pivot tables in Excel.