[R] lattice::bwplot with unbalanced design

RenE J.V. Bertin rjvbertin at hotmail.com
Wed Jul 10 22:06:19 CEST 2002


Hi,

I have an experimental design with 3 factors (Type, size and Modality), where the stimulus for Type==B, size==small was identical to that for Type==A, size==small. Since I am in the end only interested in Type==A, I "relabeled" all Type==B,size==small responses as Type==A,size==small. This gives me an unbalanced design, with a certain number of missing combinations, and others that have 2 observations. aov() seems to handle this well when I subset "Type==A".

But when I found that
> bwplot( y~Modality|Type+size )

gives an error:

Warning: no finite arguments to min; returning Inf
Warning: no finite arguments to max; returning -Inf
Error in pretty(x, ...) : NA/NaN/Inf in foreign function call (arg 1)
> traceback()
4: pretty(x, ...)
3: lpretty(x$y.limits, n = x$y.scales$tick.number)
2: print.trellis(structure(list(as.table = FALSE, aspect.fill = TRUE, 
       key = NULL, panel = "panel.bwplot", page = NULL, skip = c(FALSE, 
       FALSE, FALSE, FALSE, FALSE, FALSE), strip = "strip.default", 
       x.between = 0, y.between = 0, par.strip.text = structure(list(
           cex = 1, col = "#000000", font = 1, lines = 1), .Names = c("cex", 
(etc)

However,

> histogram( ~y|Type+size+Modality )

works fine, and just gives an empty panel.

While I understand that this kind of missing values is more "natural" in the case of a histogram than when trying to make a boxplot, I do feel that bwplot() *might* also just draw an empty panel, instead of raising an error (which is annoying since it aborts the highlevel routine too!)

Is this something to bring to Deepayan's attention?

Best,
RenE Bertin
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list