Dear Friends. Greetings! This should be a very common operation and I believe there should be a nice way in R to handle it. I couldn't find it in the manual or by searching on line. I am wondering if I could ask for some help in this community.
I am trying to record the results of my program to a csv file in the hard drive so as to save memory space and also to read the results in excel after running the program. Every loop of my program will result in a list with element belonging to different class. For example, things like a1 <- list(name="Fred", wife="Mary", no.children=3) a2 <- list(name="Tom", wife="Joy", no.children=9) a3 <- list(name="Paul", wife="Alic", no.children=5) I want the columns to have titles, in the example above, I want to see the title "name", "wife" and "no.children" in the excel file. To set up the table in the csv file, I need to add at least one row in the table up front. How ever, I do not have the first loop of the program completed yet at that time. If I add a row that is meaningless, how may I delete it after all the loops are completed and all the meaningful rows are added to the table? Best Wishes Yuchen Luo [[alternative HTML version deleted]] ______________________________________________ R-help@stat.math.ethz.ch 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.