Hi Tom,
Oh good point. In that case it's probably best to do it by hand:
diamonds$carat_bin <- cut_interval(diamonds$carat, length = 0.1)
carat_sum <- ddply(diamonds, "carat_bin", summarise,
mean_price = mean(price, na.rm = T),
mid = mean(range(carat, na.rm = T)),
)
qplot(mid, mean_price, data = carat_sum, geom = "bar", width = 0.1,
stat = "identity", position = "identity")
(this isn't quite right, but it's pretty close)
Hadley
--
http://had.co.nz/