Skip to content
Prev 32085 / 63424 Next

quantile and IQR do not check for numeric input (PR#13631)

On Mon, 30 Mar 2009 sgiannerini at gmail.com wrote:

            
Nothing of the sort is shown! The thread argued that methods for these functions for ordered factors would be useful.
The documentation says that you are not allowed to pass anything except a numeric vector to quantile() and IQR(). It doesn't, for example, say you can pass an arbitrary vector that will be checked to see if it is numeric. If you have code that passes a factor to IQR(), the bug is in that code.

On the other hand, as someone else has since reported, the 'missing values are ignored' statement in ?quantile is wrong (or at least incomplete).


     -thomas

Thomas Lumley			Assoc. Professor, Biostatistics
tlumley at u.washington.edu	University of Washington, Seattle