Quantcast

stats::median

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

stats::median

Rob J Hyndman
The generic stats::median method is defined as
   median <- function (x, na.rm = FALSE)  {UseMethod("median")}

I suggest that this should become
   median <- function (x, na.rm = FALSE, ...)  {UseMethod("median")}

This would allow additional S3 methods to be developed with additional
arguments.

Currently I have to over-ride this generic definition in the
demography package because median.demogdata has several other
arguments.

This shouldn't break any code, and will make it easier for new S3
methods to be developed. It is also consistent with almost all other
S3 methods which do include an ellipsis.

-------------------------------------------------------------
Rob J Hyndman
Professor of Statistics, Monash University
www.robjhyndman.com

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Loading...