Message-ID: <002201ca99c2$5b5431b0$11fc9510$@edu>
Date: 2010-01-20T11:18:55Z
From: Alfredo
Subject: question on runif
In-Reply-To: <7445532.693961263983131065.JavaMail.coremail@app157.163.com>
ang<-runif(20,0,2*pi)
x<-cos(ang) +0.4
y<-sin(ang) +0.8
plot(x,y,ylim=c(-3,3),xlim=c(-3,3))
-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On
Behalf Of Wolfgang?Amadeus
Sent: Wednesday, January 20, 2010 5:26 AM
To: r-help
Subject: [R] question on runif
Hello!
I have a question on uniform distribution.
I want to plot n, say 20, points, uniformly distributed, in a circle, with
radius=0.1 and center,say, (0.4, 0.8)
I do not know how~
Thank you for your time.
Yours
Wolfgang Amadeus
[[alternative HTML version deleted]]
______________________________________________
R-help at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.