Dear All,
I am currently working on a project involving a rather redundant task. I
have 11 files that I will be generating anova tables and plots for. I am
contemplating writing a for loop to process each file, create an anova
table, the appropriate plots, and save them to my hard drive. I've included
pseudo-code below.
files = c("....","......","......",".......",.......)
for (i in 1:10){
read.csv(files[i])
plot(.....)
bitmap(......) #or one of the many other plot saving functions
model = lm(.....)
anova(model)
This is where I am stuck. I'd like to have the anova table from all of my
respective models print to one nice file. I know methods exist for
extracting coefficients and the like from an anova-data.frame-class object,
however is it possible to save the exact print-out without having to copy
and paste 12 times? Any help is greatly appreciate.
It seems like a lot of work for saving a few minutes, but i'll be leaving
the script for another in our lab (who may or may not know R too well) when
I leave.
Best,
Dave Mitchell
Student
University of Illinois-Champaign Urbana
[[alternative HTML version deleted]]
______________________________________________
[email protected] 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.