From deepayan@stat.wisc.edu  Fri Dec 13 19:57:06 2002
From: deepayan@stat.wisc.edu (deepayan@stat.wisc.edu)
Date: Fri Dec 13 19:57:06 2002
Subject: [Rd] Re: [R] Problem with lattice bwplot (same as PR#2349)
Message-ID: <200212131848.TAA06973@pubhealth.ku.dk>

This is the same bug as that reported by Wolfram Fischer a few days back. I'm 
working on it, and hopefully it would be fixed by the next release of lattice 
(sometime next week).

Deepayan

On Friday 13 December 2002 08:57 am, Luis Torgo wrote:
> I've come across the following error when using free scales with bwplot (I
> use
>
> a small example data set just to illustrate the problem):
> > d <- data.frame(
>
> x=c(34.4, 12.4, NA, 65.3, NA, 12.0, 45.0, 645.0, 644.0,323.0),
> fac1=c('a','a','b','a','b','a','a','c','c','c'),
> fac2=c('v2','v2','v1','v2','v2','v2','v1','v2','v1','v2')
> )
>
> # ok, although "x" has only NA values for fac1=='b'
>
> > bwplot(fac2 ~ x | fac1,data=d)
>
> # not ok, if I try to use different scales in the X axis
>
> > bwplot(fac2 ~ x | fac1,data=d,scales=list(x="free"))
>
> Error in pretty(x[is.finite(x)], ...) : x must be numeric
>
> # I can go around the error with
>
> > bwplot(fac2 ~ x | fac1,data=d[!is.na(d$x),],scales=list(x="free"))
>
> The problem is that one of the panels has no data because 'x' has only NA
> values for that particular factor combination. This causes no problem with
> uniform scales, but generates that error when trying to guess the best
> scale for each panel. I think that it should be easy to add some test to
> the code obtaining the scales for each panel, to avoid the always
> unpleasant criptographic error messages ;-)
>
> Thanks,
> Luis Torgo



[Rd] Re: [R] Problem with lattice bwplot (same as PR#2349)
deepayan@stat.wisc.edu