Skip to content
Prev 49113 / 63424 Next

How I() works in a formula

On 03 Oct 2014, at 14:32 , Joris Meys <jorismeys at gmail.com> wrote:

            
It isn't...
Call:
lm(formula = y ~ x + E(x^2))

Coefficients:
(Intercept)            x       E(x^2)  
     0.2757       0.1725      -0.3823  


The point is that special interpretation of operators never happens inside function calls. I() is just a convenient do-nothing function call.

If you want to add special operators, one place to look is in the handling of specials for survival::coxph.