Hi!

I had a database with some variables in sequence. Let me say: TX01, TX02,
TX03 and TX04.

But I need to run some regressions changing the variables... so:

variable <- paste("TX0", 1:4, sep="")

for(i in 1:4){
test[i] <- lm(variable[i] ~ INCOME, data=database)
}

But doesn't work... lm tries to find a variable inside database named
variable[i] ...

Suggestions?


King regards!

Raphael Saldanha
Brasil

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to