[R] generating data

Huntsinger, Reid reid_huntsinger at merck.com
Fri May 7 16:34:20 CEST 2004


Keep in mind that the change of coordinates introduces a distortion; "dxdy"
becomes in polar coordinates "rdrdtheta". So if you wanted a uniform
distribution on the disk you could generate theta uniform on [0,2pi] and r
from a distribution with density f(r)=2r on [0,1]. 

Reid Huntsinger

-----Original Message-----
From: r-help-bounces at stat.math.ethz.ch
[mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Lutz Prechelt
Sent: Friday, May 07, 2004 3:43 AM
To: r-help at stat.math.ethz.ch
Subject: RE: [R] generating data


Do you mean random data?
Generate polar coordinates (angle in range 0..2pi, radius in range 0..1)
and convert.

  Lutz

> -----Original Message-----
> From: r-help-bounces at stat.math.ethz.ch 
> [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Fred J.
> Sent: Freitag, 7. Mai 2004 09:14
> To: r help
> Subject: [R] generating data
> 
> 
> Hello
> I am trying to generate data in say 2D "x,y" for a
> circle. grid.circle {grid} does not do. any ides is
> appreciated.
> 
> Thanks
> F.J.
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! 
> http://www.R-project.org/posting-guide.html
>

______________________________________________
R-help at stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide!
http://www.R-project.org/posting-guide.html




More information about the R-help mailing list