[R] Strange parsing behavior

Michael Conklin michael.conklin at markettools.com
Thu Nov 17 23:28:09 CET 2005


I am suddenly having a problem with my R installation (R 2.1.1) in that any linear models that access variables that have a "." in their name fail.

e.g. 
> tempdata<-data.frame(dep=rnorm(1000),pred.test=rnorm(1000))
> lm(dep~pred.test,data=tempdata)
Error in parse(file, n, text, prompt) : parse error
>

But
> tempdata<-data.frame(dep=rnorm(1000),predtest=rnorm(1000))
> lm(dep~predtest,data=tempdata)

Call:
lm(formula = dep ~ predtest, data = tempdata)

Coefficients:
(Intercept)     predtest  
    0.05260      0.04453  

Clearly I have screwed something up but I have no idea what.  (This suddenly started happening today).

Michael Conklin
Chief Methodologist - Advanced Analytics
MarketTools Inc
(952)417-4719  office
(612)201-8978 mobile
Michael.Conklin at markettools.com
 
 




More information about the R-help mailing list