Why am I seeing "Error: length(rows) == 1 is not TRUE" with ddply?
Probably because you've mistaken summarize
for summary
(which won't work like you expect in this context). You probably wanted:
ddply(payroll, "PayBasis", summarize,mx = max(NumRate),mn = min(NumRate),avg = mean(NumRate))
PayBasis mx mn avg
1 Annual 26843.0 26843.0 26843.0
2 Hourly 13.5 13.5 13.5
3 ProratedAnnual 14970.0 14970.0 14970.0
And be sure to look more carefully at the examples in ?summarize
and ?ddply
.