We can generate orthogonal polynomials in R with
pp <- poly(cars$speed, 2)
Is there a way to get the original values out of the result pp (inverse poly function)?
In other words, what should the function f look like that returns the following result:
f(poly(cars$speed, 2)) == cars$speed?