[R] solving x in a polynomial function

Jeff Newmiller jdnewmil at dcn.davis.CA.us
Fri Mar 1 20:11:59 CET 2013


help.search("polynomial")
---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil at dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
--------------------------------------------------------------------------- 
Sent from my phone. Please excuse my brevity.

Mike Rennie <mikerennie.r at gmail.com> wrote:

>Hi there,
>
>Does anyone know how I solve for x from a given y in a polynomial
>function? Here's some example code:
>
>##example file
>
>a<-1:10
>
>b<-c(1,2,2.5,3,3.5,4,6,7,7.5,8)
>
>po.lm<-lm(a~b+I(b^2)+I(b^3)+I(b^4)); summary(po.lm)
>
>(please ignore that the model is severely overfit- that's not the
>point).
>
>Let's say I want to solve for the value b where a = 5.5.
>
>Any thoughts? I did come across the polynom package, but I don't think
>that does it- I suspect the answer is simpler than I am making it out
>to be. Any help would be welcome.



More information about the R-help mailing list