I'm practicing R with dataframe InsectSprays (in R base), using plyr package:
ddply(InsectSprays,.(spray), summarize, sum = sum(count))
Error in .fun(piece, ...) : argument "by" is missing, with no default
I don't understand what this error mean, the tutorial did the exact the same command and has the output like this:
spray sum
1 A 174
2 B 184
3 C 25
and also I wanna create a new variable(still error):
spraysum <- ddply(InsectSprays,.(spray), summarize, sum = ave(count,FUN = sum))
Error in .fun(piece, ...) : argument "by" is missing, with no default