[Rd] Re: [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:36:42 CEST 2004

>>>>> "BDR" == Prof Brian Ripley <ripley at stats.ox.ac.uk>
>>>>>     on Thu, 10 Jun 2004 08:04:17 +0100 (BST) writes:

    BDR> This is surely a bug in jitter, which should pass through a 0-length input 
    BDR> unchanged as S does (and I will fix that).

    BDR> I do wonder what jitter should do with a length-1 input.  It does change 
    BDR> it, using a rather arbitrary notion of the scale of the change (as does 
    BDR> S).  Given the description

    BDR> 'jitter(x,...)' returns a numeric of the same length as 'x', but
    BDR> with an 'amount' of noise added in order to break ties.

    BDR> it appears it should not change a length-1 input.

    BDR> Opinions?

I agree with you:  It shouldn't change a length-1 input by
default (when no 'amount' is specified)
One could argue that it should add jitter when a positive
'amount' is specified explicitly.  But I'd still vote for having
return length-1 arguments unaltered.


More information about the R-devel mailing list