I have a question, I generated a simulation where you essentially have a 100x100 plot in R and start in the center (50,50), then take a step in one direction and step by step try to reach the outside. 

I was able to generate the loop to be able to do this, but now I would like to run this particular loop 10,000 times and then generate a summary for it and look at the distribution. I'm just not real sure how to run the loop 10,000 times then generate the summary for it or how that might look. I have included what I have so far: 

```
plot(0:100,0:100,type="n")
points(50,50,col="red",pch=16,cex=1.5)
x0<-50
y0<-50
x1<-sample(c(-1,0,1),1)
y1<-sample(c(-1,0,1),1)

for(i in 1:50000){
  x1<-sample(c(-1,0,1),1)
  y1<-sample(c(-1,0,1),1)
  lines(c(x0,x0+1),c(y0,y0+1))
  x0<-x0+x1
  y0<-y0+y1
  if(x0>100|x0<0|y0>100|y0<0)break
}

```