[R-sig-Geo] Randomly moving a locality (within set limits)
Alastair Potts
potts.a at gmail.com
Mon Aug 25 12:03:59 CEST 2014
Dear Frede, Barry and Don,
Thanks very for your thoughts!
Frede's function looks perfect! Thanks very much!!!
Barry, would not setting random U(-N,N) distance deal with the uniform
distance problem [i.e. distance <- runif(1,-15,15)].
Cheers,
Alastair
On 25 August 2014 10:48, Barry Rowlingson <b.rowlingson at lancaster.ac.uk>
wrote:
> > Now choose
> >
> > bearing <- runif(1, 0, 360)
> >
> > and
> >
> > distance <- runif(1, 0, 15)
> >
> > Please check the formulas against the homepage above.
>
> Note: choosing a random bearing U(0,360) and a random U(0,N) distance
> DOESNT generate a uniform distribution over the disk of radius N!
> You get more points near the centre!
>
> Barry
>
--
Dr. Alastair J. Potts
-----------------------------------------------------------------------------------------------------------------
NRF Research Career Award Fellow
Botany Department, Nelson Mandela Metropolitan University
C: 082 491-7275
O: 041 504-4375
W: https://sites.google.com/site/dralastairpotts/home
-----------------------------------------------------------------------------------------------------------------
"Research presumes dissatisfaction with existing descriptions of reality
and explanations of our experience of it - it rests on the desire to do
better than the current consensus. Research, therefore, requires freedom to
question received wisdom and some background knowledge of why we think we
know what we think we know." John F. Allen (2003; Future Med. Chem,
2:15-20)
-----------------------------------------------------------------------------------------------------------------
[[alternative HTML version deleted]]
More information about the R-sig-Geo
mailing list