[Rd] quantile and IQR do not check for numeric input (PR#13631)
sgiannerini at gmail.com
sgiannerini at gmail.com
Mon Mar 30 12:15:15 CEST 2009
This report follows the post
http://tolstoy.newcastle.edu.au/R/e6/devel/09/03/0760.html
where it is shown that quantile() and IQR() do not work as documented.
In fact they do not check for numeric input even if the documentation says =
:
?quantile
x numeric vectors whose sample quantiles are wanted. Missing
values are ignored.
?IQR
x a numeric vector.
> quantile(factor(1:9))
0% 25% 50% 75% 100%
1 3 5 7 9
Levels: 1 2 3 4 5 6 7 8 9
> IQR(factor(1:9))
[1] 4
> R.version
_
platform i386-pc-mingw32
arch i386
os mingw32
system i386, mingw32
status alpha
major 2
minor 9.0
year 2009
month 03
day 26
svn rev 48224
language R
version.string R version 2.9.0 alpha (2009-03-26 r48224)
--
______________________________________________________
Simone Giannerini
Dipartimento di Scienze Statistiche "Paolo Fortunati"
Universita' di Bologna
Via delle belle arti 41 - 40126 =A0Bologna, =A0ITALY
Tel: +39 051 2098262 =A0Fax: +39 051 232153
http://www2.stat.unibo.it/giannerini/
More information about the R-devel
mailing list