Re: [R] uniform and clumped point plots

From: Jim Lemon <jim_at_bitwrit.com.au>
Date: Sat 20 May 2006 - 08:57:42 EST


Beutel, Terry S wrote:
>
> I am trying to generate two dimensional random coordinates.
>
> For randomly distributed data I have simply used
>

> >xy<-cbind(runif(100),runif(100))

>
> However I also want to generate coordinates that are more uniformly
> distributed, and coordinates that are more contagiously distributed
> than the above.

Hi Terry,

Not sure exactly what you are trying to do, but if you want to space out overlying points, you might find cluster.overplot in the plotrix package useful.

On the other hand, if you want coordinate pairs that are more evenly spaced, maybe something like this:

xy<-cbind(sample(seq(0,1,length=101),100,TRUE),   sample(seq(0,1,length=101),100,TRUE))

Jim

PS Did you mean "contiguously"?



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Fri May 19 19:02:12 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Fri 19 May 2006 - 20:10:14 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.