Dear Terry,

I'm not entirely sure if this is what you're looking for, but here's my
suggestion.

To make more uniformly distributed points, you might try something like
xy <- expand.grid(list(seq(0,1,.1), seq(0,1,.1)))
plot(jitter(xy[,1], 1.5), jitter(xy[,2], 1.5))

Like I said, I don't know if this is any better.

For the clumped data, I would suggest a something like draws out of two
different normals,
something like this:

xy1 <- matrix(rnorm(250, .6, .25), ncol=2)
xy2 <- matrix(rnorm(250, -.6, .25), ncol=2)
xy12 <- rbind(xy1, xy2)
plot(xy12)

The sd of the normal controls the "clumpiness" of the data.

Hope this helps,

Dave.
 --
Dave Armstrong
University of Maryland
Dept of Government and Politics
3140 Tydings Hall
College Park, MD 20742
Office: 2103L Cole Field House
Phone: 301-405-9735
e-mail: [EMAIL PROTECTED]
web: www.davearmstrong-ps.com



On 5/17/06, Beutel, Terry S <[EMAIL PROTECTED]> 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.
>
> Can anyone make any suggestions
>
> Thanks.
>
> Dr Terry Beutel
> Rangeland Scientist
> Animal Sciences
> Department of Primary Industries and Fisheries
>
> Telephone 07 4654 4282  Facsimile  07 4654 4235
> Email [EMAIL PROTECTED]
> Address  DPI Hood Street Charleville Q 4470
> PO Box 282, Charleville Q 4470
> Website www.dpi.qld.gov.au  Call Centre 13 25 23
>
>
> ********************************DISCLAIMER******************...{{dropped}}
>
> ______________________________________________
> 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
>

        [[alternative HTML version deleted]]

______________________________________________
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