Re: [R] print and rbind within a for loop

2015-03-25 Thread Steven LeBlanc
Hi Dave, Bill, Thank you. That was it! Best Regards, Steven On Mar 25, 2015, at 1:11 PM, David R Forrest wrote: > I'm away from a computer that can check syntax, but make sure the return is > outside of the for loop. To my eye it looks inside. [[alternative HTML version deleted]]

Re: [R] print and rbind within a for loop

2015-03-25 Thread William Dunlap
then exits the loop and routine with the > unmodified result. > > > > Dave > > > > From: R-help [r-help-boun...@r-project.org] on behalf of Steven LeBlanc > [ores...@gmail.com] > > Sent: Wednesday, March 25, 2015 3:43 PM >

Re: [R] print and rbind within a for loop

2015-03-25 Thread Steven LeBlanc
and the return() then exits the loop and routine with the unmodified result. > > Dave > > From: R-help [r-help-boun...@r-project.org] on behalf of Steven LeBlanc > [ores...@gmail.com] > Sent: Wednesday, March 25, 2015 3:43 PM > To: r-help@

[R] print and rbind within a for loop

2015-03-25 Thread Steven LeBlanc
Greets, I'm trying to iteratively find solutions to a problem given a range of options. Code is as follows: sim.app.wald<-function(B=0.1,min=10,max=50,alpha=0.05){ result<-c(fails=0,n=0) for(n in min:max){ x<-seq(1,n-1,1) fhat<-x/n