Re: [R] Help in Bissection algorithm

2012-11-29 Thread jim holtman
What is 'i'? I don't see it as a parameter? is it something in the global environment that you forgot to pass? On Thu, Nov 29, 2012 at 10:18 AM, finehko wrote: > I'm trying to make a function witch recieves a function "f", "a" and "b", and > the error "e". When I run the algorithm without label

Re: [R] Help in Bissection algorithm

2012-11-29 Thread William Dunlap
BCO Software wdunlap tibco.com > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On > Behalf > Of Berend Hasselman > Sent: Thursday, November 29, 2012 12:13 PM > To: finehko > Cc: r-help@r-project.org > Subject: Re: [R] Help i

Re: [R] Help in Bissection algorithm

2012-11-29 Thread Rui Barradas
Hello, Actually, it would throw an error, you forgot to assign 'i'. And in the end your function didn't have a return value. I've edited and simplified it a bit. (And what to do if abs(a - b) == e ? The second condition was deleted.) raiz <- function(f,a,b,e){ i <- 0 repeat{ if

Re: [R] Help in Bissection algorithm

2012-11-29 Thread Berend Hasselman
On 29-11-2012, at 16:18, finehko wrote: > I'm trying to make a function witch recieves a function "f", "a" and "b", and > the error "e". When I run the algorithm without labeling it a function and > typing the values it works, but when I just try to save it in a function It > doesn't ' bug but do