[R] jitter function when length(x) = 1
David Winsemius
dwinsemius at comcast.net
Thu Oct 9 19:53:42 CEST 2014
On Oct 9, 2014, at 10:19 AM, Ingrid Charvet wrote:
> Hello,
>
> A quick question relating to the documentation of the jitter function:
> http://127.0.0.1:15714/library/base/html/jitter.html
>
> jitter(x, factor = 1, amount = NULL)
>
> "If amount is NULL (default), we set a <- factor * d/5 where d is the smallest difference between adjacent unique (apart from fuzz) x values."
>
> Therefore if length(x) = 1, then d = 0, which means jitter(x) should be equal to x?
> Which is not the case, i.e.
>
>> x <- 1
>> jitter(x)
> [1] 0.9842914
>
> So how does jitter deals with this situation? Does it assume d = x?
The code is right at your fingertips. Just type:
jitter
--
David.
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
David Winsemius
Alameda, CA, USA
More information about the R-help
mailing list