[R] Help with a Lattice plot that fails with an empty unique combination

Martin Maechler maechler at stat.math.ethz.ch
Thu Jun 10 09:09:12 CEST 2004

>>>>> "Deepayan" == Deepayan Sarkar <deepayan at stat.wisc.edu>
>>>>>     on Wed, 9 Jun 2004 18:04:38 -0500 writes:

    Deepayan> On Wednesday 09 June 2004 01:58, Tom Mulholland wrote:
    >> While using Lattice I received the following error.
    >> Error in if (xx != 0) xx/10 else z/10 : argument is of length zero
    >> In addition: Warning messages:
    >> 1: is.na() applied to non-(list or vector) in: is.na(x)
    >> 2: is.na() applied to non-(list or vector) in: is.na(x)
    >> 3: no finite arguments to min; returning Inf
    >> 4: no finite arguments to max; returning -Inf
    >> 5: NaNs produced in: log(x, base)
    >> Can anyone point me in the right direction.

    Deepayan> A traceback() shows that this is happening due to
    Deepayan> jitter() being called with a length-0 numeric.

clearly a bug in jitter()  -- which has been fixed 2 minutes ago
for R 1.9.1 alpha {and R-devel}:
Now "jitter(x)" has "if(length(x) == 0) return(x)".

    Deepayan> I have added a check in panel.stripplot. Until the
    Deepayan> next release, you can work around it by:


Martin Maechler

More information about the R-help mailing list