This paper that was published for reshape package (Wickham 2007) gave this example:
library(reshape2)
ffm <- melt(french_fries, id = 1:4, na.rm = TRUE)
dcast(ffm, variable ~ ., c(min, max))
Similarly, this doesn't work in reshape2 but appears to work in Wickham 2007
dcast(ffm, variable ~ ., summary)
However the cast function is giving an error. How can I get function to work?