[R] Does inverse function exist in R

From: Patrick Wang <pwang_at_berkeley.edu>
Date: Sat 27 Jan 2007 - 05:52:25 GMT


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@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. Received on Sat Jan 27 16:58:49 2007

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Sat 27 Jan 2007 - 08:30:28 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.