Skip to content
Prev 360112 / 398506 Next

Bug in by() function which works for some FUN argument and does not work for others

There was in the not-so-distant past a function named `mean.data.frame` which would have "worked" in that instance. That function was removed. I thought you could  find the exact date of that action by searching the NEWS but failed. Reviewing the citations of `mean.data.frame` in the r-help archives I see that users were being warned that its use was deprecated in mid 2012.  It's very possible that the authors of a book in 2012 were using an earlier version of R that had that facility available to them before it was deprecated. With a more than current version of R 3.3.0 and a modest number of loaded packages I see this:
[1] mean,ANY-method          mean,Matrix-method       mean,Raster-method      
 [4] mean,sparseMatrix-method mean,sparseVector-method mean.Date               
 [7] mean.default             mean.difftime            mean.POSIXct            
[10] mean.POSIXlt             mean.yearmon*            mean.yearqtr*           
[13] mean.zoo*

It is your responsibility to determine whether any particular function in your version of R satisfies the language requirements at the time of your use. Jim Albert and Maria Rizzo do not set the standards for what is an evolving piece of software.