[R] Does inverse function exist

2007-01-27 Thread phwang2000
Hi, I wrote a simple derivative program (ftest=deriv(y~x^2, c(x), function(x){} )) I put (ftest=deriv(y~x^2, c(x), function(x){} ))(1) which return 2 which is correct. however, if I want the output to be 0 and hopefully a new inverse function can take in output (2) and return x=1. Can this

Re: [R] Does inverse function exist

2007-01-27 Thread Prof Brian Ripley
Inverting a linear function is easy, and more generally functions need not be invertible. But uniroot() is very helpful in finding an inverse of a monotonic function, and the idea is used in some of the qx functions. On Fri, 26 Jan 2007, [EMAIL PROTECTED] wrote: Hi, I wrote a simple

[R] Does inverse function exist in R

2007-01-26 Thread Patrick Wang
Hi, I wrote a simple derivative program (ftest=deriv(y~x^2, c(x), function(x){} )) I put (ftest=deriv(y~x^2, c(x), function(x){} ))(1) which return 2 which is correct. however, if I want the output to be 0 and hopefully a new inverse function can take in output (2) and return x=1. Can this be