In the body of base::mean.default the following piece of code is found:

        if (trim >= 0.5)
            return(stats::median(x, na.rm = FALSE))

Should this not be

         if (trim >= 0.5)
            return(stats::median(x, na.rm = na.rm))

where na.rm is supplied in the call to mean.default?

If considered a bug I can imagine why it has low practical importance...

Kind regards,
Henrik

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to