hi all, i wanted to use the sink function to sequentially output regression summaries within a for-loop. i must have something wrong somewhere (or be using the sink function incorrectly), but can anyone help?
the code I am using is: where data.x is a data.frame of independents, and data.y is a data.frame of dependents. > for (i in 1:length(data.y)){ > taxa.i <- names(data.y[i]) > jpeg(file=paste(taxa.i,".multiple.regress.residuals.1.RAW.jpeg",sep=""), quality=90, width=1000, height=1000) > par(mfrow=c(2,2), lwd=0.5, mar=c(3,4,3,1), bty="o", oma=c(0,3,2,0)) > attach(data.x) > mult.reg.raw.i <- lm(data.y[,i] ~ CURRENT + LITTER + PERCURR + SUBST) > plot(mult.reg.raw.i, ask=FALSE) > mtext(names(data.y[i]), side=3, line=-1.5, adj=0.48, cex=0.75, outer=TRUE) > dev.off() > sink("mulptiple regression - summary RAW.txt", append=TRUE) > summary(mult.reg.raw.i) > sink() > } cheers, tony __________________________________________ tony dell department of marine and tropical biology james cook university townsville, qld 4811 australia [p] 07 47815751 or 47814520 [e] [EMAIL PROTECTED] [skype] anphony Checked by AVG. 6:27 PM ______________________________________________ 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.