I cannot understand why I get the following error when creating a pie chart?
labels = c('payroll', 'wins')
pie(as.numeric(by(payroll,wins)),labels)
Error in FUN(dd[x, ], ...) : argument "FUN" is missing, with no default
payroll
400000 320000 500000
wins
50 24 53