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

Reply via email to