From maechler at stat.math.ethz.ch  Thu Jun 10 09:36:42 2004
From: maechler at stat.math.ethz.ch (Martin Maechler)
Date: Thu Jun 10 09:36:44 2004
Subject: [Rd] Re: [R] Help with a Lattice plot that fails with an empty
	unique combination
In-Reply-To: <Pine.LNX.4.44.0406100754520.3886-100000@gannet.stats>
References: <200406091804.38752.deepayan@stat.wisc.edu>
	<Pine.LNX.4.44.0406100754520.3886-100000@gannet.stats>
Message-ID: <16584.3978.930989.660589@gargle.gargle.HOWL>

>>>>> "BDR" == Prof Brian Ripley <ripley@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.

Martin


[Rd] Re: [R] Help with a Lattice plot that fails with an empty unique combination
Martin Maechler