Suppose Z
is a vector of feature names.
How can I get the summary command in the following Rscript to actually print?
for (var in Z)
{
#cat(i)
form = paste('crim ~', var)
lm.fit=lm(form, data=Boston)
summary(lm.fit)
}
If I type summary(lm.fit)
at the R prompt, it works, but when I source the Rscript which contains this loop, I get no output. I have already tried the solution How can I run an 'R' script without suppressing output? but it does not cause summary to print.