Skip to content

mean (PR#10864)

2 messages · paulponcet at yahoo.fr, Greg Snow

#
Full_Name: Paul PONCET
Version: 2.6.0
OS: Windows 2000
Submission from: (NULL) (83.137.240.218)


Function 'mean.default' calls function 'stats::median' if 'trim >= 0.5'. In that
case the call should be 'stats::median(x, na.rm = na.rm)' instead of
'stats::median(x, na.rm = FALSE)'.
#
Look again at the whole function of mean.default.  All of the missing
values have already been removed if na.rm==TRUE before the call to
stats::median, so why waste time looking for missing values that are not
there.