From han at enfor.dk  Tue Sep 23 17:25:07 2008
From: han at enfor.dk (han at enfor.dk)
Date: Tue, 23 Sep 2008 17:25:07 +0200 (CEST)
Subject: [Rd] Bug in base::mean.default ? (PR#12984)
Message-ID: <20080923152507.231832834169@mail.pubhealth.ku.dk>

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



[Rd] Bug in base::mean.default ? (PR#12984)
han at enfor.dk