Re: [R] Help with Iterator

2010-11-09 Thread Daniel Nordlund
> -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] > On Behalf Of zhiji19 > Sent: Tuesday, November 09, 2010 12:02 AM > To: r-help@r-project.org > Subject: [R] Help with Iterator > > > Dear Experts, > > The f

Re: [R] Help with Iterator

2010-11-09 Thread Nick Sabbe
] On Behalf Of zhiji19 Sent: dinsdag 9 november 2010 9:02 To: r-help@r-project.org Subject: [R] Help with Iterator Dear Experts, The following is my "Iterator". When I try to write a new function with itel, I got error. This is what I have: > supDist<-function(x,y) return(

[R] Help with Iterator

2010-11-09 Thread zhiji19
Dear Experts, The following is my "Iterator". When I try to write a new function with itel, I got error. This is what I have: > supDist<-function(x,y) return(max(abs(x-y))) > > myIterator <- function(xinit,f,data=NULL,eps=1e-6,itmax=5,verbose=FALSE) { + xold<-xinit + itel<-0 + repeat { + xn