[R] Does inverse function exist

Prof Brian Ripley ripley at stats.ox.ac.uk
Sat Jan 27 14:44:10 CET 2007


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 qxxxxx functions.

On Fri, 26 Jan 2007, phwang2000 at ucla.edu wrote:

> 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
> accomplished. Maybe output(0) can return x=0
>
> Thanks
> pat
>
> ______________________________________________
> R-help at stat.math.ethz.ch 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.
>

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-help mailing list