[R] difficult R-problem
Andreas Pauling
pauling at giub.unibe.ch
Fri Feb 15 12:28:30 CET 2002
Hi there
In the course of my diploma thesis in climatology I have encountered
a difficult R-Problem that I cannot solve. I want to fill R-Objects
(whose names should depend on j) with numbers at the i-th position.
The resulting Objects should be something like:
RQuadratStep1, RQuadratStep2, RQuadratStep3 ... filled with Elements like
c(0.324, 0.456, 0.657 ...)
Below is a short version of how I have tried to solve it but I don't
know how to insert numbers at the i-th place. The problem seems to be
the "assign" line. Thanks a lot for all hints.
for(j in 1:10) {
for(i in 1:30) {
fit<-lm(annJMSLTv.box~.,data=data.frame(annJMSLTv.box=annJMSLTv.box[,i],allTreerings[,1:15])
backfit<-step(fit,trace=F,steps=1)
assign(eval(parse(text=paste("RQuadratStep",j,sep=""))),round(summary(fit)$r.squared, dig=3))
}
}
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list