Thank you both very much for your assistance. Both the suggestions worked out
in the end, and I managed to achieve what I wanted.
There is something else I want to try, which is a slight deviation on the
theme. In the code I posted, I export Intercept and Slope regression
coefficients to an o/p m
A partial answer is...
After doing debug(lm.fit) and debug(lm), and waiting to see where the
messages come from, I can tell that when you do na.action=NULL, the R
goes to call the Fortran routine dqrls (through .Fortran) and when R
prepares the data to pass to the dqrls it triggers one of the
That's good. Try this:
1. put set.seed(1) at the top of the code to make it reproducible.
2. replace body of loop with:
sel_col<-SourceMat[, i]
out <- try(coef(lm(tt~sel_col, na.action=NULL)))
if (!inherits(out, "try-error")) ResultMat[,i] <- out
3. email tends to wrap long
3 matches
Mail list logo