Good morning to all,

I should find the zero of a specific function,

        func(x,f.
me,c,t)=x+f.me*c-t

where 'c' and 't' are constants and 'f.me' is an other 
function of 'x'.
Actually, I am interested in considering 'f.me' as an 
expression().

Namely,

        uniroot.me<-function(f.me,c,t){

        
                func<-function(x,
f.me,c,t) x+eval(f.me)*c-t

        

                uniroot(func,c(0,1),f.me=f.me,c=c,t=t)$root

        


        }

        
        uniroot.me(expression(x*(1-x)),c=1,t=1)

For instance, let me suppose 
that 'f.me=expression(x^a*(1-x))'. How should I do in order to introduce the 
new constant 'a' in function 'uniroot.me'?

Thank you very much,

Enrico 
Foscolo

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to