[R] question on runif
Alfredo
arios at ufl.edu
Wed Jan 20 12:18:55 CET 2010
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.
More information about the R-help
mailing list