[R] unexpected behavior of boxplot(x, notch=TRUE, log="y")

bogdan romocea br44114 at gmail.com
Thu Oct 5 17:26:35 CEST 2006


A function I've been using for a while returned a surprising [to me,
given the data] error recently:
   Error in plot.window(xlim, ylim, log, asp, ...) :
       Logarithmic axis must have positive limits

After some digging I realized what was going on:
x <- c(10460.97, 10808.67, 29499.98, 1, 35818.62, 48535.59, 1, 1,
   42512.1, 1627.39, 1, 7571.06, 21479.69, 25, 1, 16143.85, 12736.96,
   1, 7603.63, 1, 33155.24, 1, 1, 50, 3361.78, 1, 37781.84, 1, 1,
   1, 46492.05, 22334.88, 1, 1)
summary(x)
boxplot(x,notch=TRUE,log="y")  #unexpected
boxplot(x)  #ok
boxplot(x,log="y")  #ok
boxplot(x,notch=TRUE)  #aha

I can get around this, but thought that maybe boxplot() should be
adjusted to deal with something like this on its own.

Thank you,
b.

platform       i386-pc-mingw32
arch           i386
os             mingw32
system         i386, mingw32
status
major          2
minor          4.0
year           2006
month          10
day            03
svn rev        39566
language       R
version.string R version 2.4.0 (2006-10-03)



More information about the R-help mailing list