Hi,

if I know the colnames x and y in the following example, I can easily to do lm.
tmp <- data.frame(x=c(1,1.2),y=c(1,2))
lm(y ~ x, data=tmp)

when the colnames are variable, what should I do? for example
colnames(tmp)[1] <- paste("aa",1,sep="_")
lm(y ~ paste("aa",1,sep="_"), data = tmp)
it gives me error.





      
	[[alternative HTML version deleted]]

