-----Original Message-----
From: Strumila, John [mailto:John.Strumila at team.telstra.com]
Sent: Thursday, 11 January 2001 2:46 PM
To: r-help at stat.math.ethz.ch
Subject: [R] lm variable name limit?
gday R gurus,
has anyone seen this lm problem?
When I add 2 bytes to the variable name (via names), lm
returns an error.
It's as if there's a limit to the size of the variable names.
Any suggestions?
thanks,
John Strumila
[1] "Log.SQLServer.Locks.RID.Lock.Wait" "Log.SQLServer.Lock"
[3] "xxaa"
names(y)[12]<-"Log.SQLServer.Locks.RID.Lock.Wa"
my.formula<-as.formula(paste(paste("y$",names(y)[12:14],collap
se="+",sep="")
,' ~ ',paste('x$"',names(x),'"',sep="",collapse="+"),"-1"))
Call:
lm(formula = my.formula)
Coefficients:
x$\"1\" x$\"2\" x$\"3\" x$\"4\" x$\"6\" x$\"7\" x$\"8\"
x$\"9\"
0 NA NA NA 0 0 NA
NA
x$\"10\" x$\"11\" x$\"12\" x$\"13\" x$\"14\" x$\"15\" x$\"16\"
x$\"17\"
0 NA NA NA 0 NA 0
NA
x$\"18\" x$\"19\" x$\"20\" x$\"21\" x$\"22\" x$\"23\" x$\"24\"
x$\"25\"
0 NA NA NA 0 NA 0
NA
x$\"26\" x$\"27\" x$\"28\" x$\"29\" x$\"30\" x$\"32\" x$\"33\"
x$\"34\"
NA 0 NA NA 0 NA NA
NA
x$\"35\" x$\"36\" x$\"37\" x$\"38\" x$\"39\" x$\"40\" x$\"41\"
x$\"42\"
NA NA 0 NA 0 NA NA
NA
x$\"44\" x$\"45\" x$\"46\" x$\"47\" x$\"49\" x$\"50\" x$\"52\"
x$\"53\"
NA NA NA NA 0 NA 0
NA
x$\"54\" x$\"55\" x$\"56\" x$\"57\" x$\"58\"
0 NA 0 NA NA
names(y)[12]<-"Log.SQLServer.Locks.RID.Lock.Wait" #<==
add 2 chars to
variable name
my.formula<-as.formula(paste(paste("y$",names(y)[12:14],collap
se="+",sep="")
,' ~ ',paste('x$"',names(x),'"',sep="",collapse="+"),"-1"))
Error in y$Log.SQLServer.Locks.RID.Lock.Wait +
y$Log.SQLServer.Lock + :
non-numeric argument to binary operator
_
platform i686-pc-linux-gnu
arch i686
os linux-gnu
system i686, linux-gnu
status
major 1
minor 1.0
year 2000
month June
day 15
language R
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-.-.-.-.-.-.-.-.-
r-help mailing list -- Read
http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To:
r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._.
_._._._._._._._._