Re: [R] question on runif

2010-01-20 Thread Carl Witthoft
While I agree that this is someone's homework, it occur to me that we can mess him up a little more. He asked for 200 points *uniformly* distributed on (or in) a circle. Well, he did NOT say "uniform random distribution". So in fact the plot, "on" a circle would be theta <-seq(0,2*pi, by =

Re: [R] question on runif

2010-01-20 Thread Rolf Turner
Ted, Alfredo, et al: Please stop doing this jerk's homework for him!!! cheers, Rolf Turner ## Attention:\ This e-mail message is privileged and confid...{{dropped:9}}

Re: [R] question on runif

2010-01-20 Thread Ted Harding
-project.org > [mailto:r-help-boun...@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, un

Re: [R] question on runif

2010-01-20 Thread Alfredo
o: 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 HTM

Re: [R] question on runif

2010-01-20 Thread Alfredo
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-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Wolfgang Amadeus Sent: Wednesday, January 20, 2010 5:26 AM To: r-help Subject: [R]

[R] question on runif

2010-01-20 Thread Wolfgang Amadeus
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]] __