Skip to content

add random fluctuation x and y coordinates

3 messages · Eva Kaiserseder, ONKELINX, Thierry, Agustin Lobo

#
You need to do 

jitter(test$x, amount = 0.01)

instead of

jitter(test$x, amount = test$x + 0.01)

HTH,

Thierry

------------------------------------------------------------------------
----
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature
and Forest
Cel biometrie, methodologie en kwaliteitszorg / Section biometrics,
methodology and quality assurance
Gaverstraat 4
9500 Geraardsbergen
Belgium
tel. + 32 54/436 185
Thierry.Onkelinx at inbo.be
www.inbo.be 

Do not put your faith in what statistics say until you have carefully
considered what they do not say.  ~William W. Watt
A statistical analysis, properly conducted, is a delicate dissection of
uncertainties, a surgery of suppositions. ~M.J.Moroney
#
I've you use runif:

 > options(digits=11)
 > v1 <- c(428381.60000, 428871.60000, 408027.20000, 406870.40000)
 > v1
[1] 428381.6 428871.6 408027.2 406870.4
 > v1+r
[1] 428381.59167 428871.60388 408027.19276 406870.39058

I've you use jitter:
 > jitter(v1,0.01)
[1] 428382.48671 428872.43348 408026.50774 406869.64816

Agus

Eva Kaiserseder escribi?: