Skip to content
Prev 307506 / 398506 Next

Constant Error in R

I confirm the previous poster's lack of error in running the code supplied. I also agree that something strange is going on.

But the error message says you have a non-numeric argument in a binary operator. That means that i) you are using a binary operator (^ in this case) either yourself or in a function you;re calling and ii) either x or 2 is non-numeric. 

Two possibilities that are siompler than recompiling:
First, are you calling the lm() you think you are? Run traceback() after the error to see where it actually occurred. You may find a user-defined function that is masking lm(). That could hang around from a previous R session if you defined one and saved the image on closing.

Second: Check the class of your input data. Then fix whichever variable should be numeric and isn't. (this is less likely as lm() returns a different error with non-numeric input).

S

*******************************************************************
This email and any attachments are confidential. Any use...{{dropped:8}}