On Oct 25, 2012, at 2:24 PM, Rlotus wrote:

> I have his code. I wanna draw the graph according to x and y. But at the end

> when I run the code it gives me only one dot.......it is strange cuz from

> the loop it has to give 20 dots. Help me plz to draw a graph(((

>

> for (i in seq(1:20))

> {rsidpVector= rsidp(1)

> x<-mean(rsidpVector)

> y<-length(number)

> plot(y,x,ylab="sample mean",xlab="sample size")

> print (rsidpVector)

> print(x)

>

> }

>

>

> rsidp<-function(x){

> i=0

> {y<-sample(number,x), replace=TRUE}

> return(y)

> }

>

>

Set up the plot before the loo and then use the points function inside the loop.

David Winsemius, MD

Alameda, CA, USA

______________________________________________

[hidden email] mailing list

https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide

http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code.