[R] jitter function when length(x) = 1

Ingrid Charvet Ingrid.Charvet at rms.com
Thu Oct 9 19:19:54 CEST 2014


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?

Thanks
IC

________________________________
This message and any attachments contain information that may be RMS Inc. confidential and/or privileged. If you are not the intended recipient (or authorized to receive for the intended recipient), and have received this message in error, any use, disclosure or distribution is strictly prohibited. If you have received this message in error, please notify the sender immediately by replying to the e-mail and permanently deleting the message from your computer and/or storage system.



	[[alternative HTML version deleted]]



More information about the R-help mailing list