Skip to content
Prev 240360 / 398500 Next

Loop

On Nov 3, 2010, at 5:03 PM, Matev? Pavli? wrote:

            
It appears you are not reading for meaning. Burns has advised you how  
to construct column names and use them in your initial steps. The `$`  
function is quite limited in comparison to `[[` , so he was showing  
you a method that would be more effective.  BTW the as.data.frame step  
is unnecessary, since the first thing write.table does is coerce an  
object to a data.frame. The "write.table" name is misleading. It  
should be "write.data.frame". You cannot really write tables with  
write.table.

You would also use:

  file=paste(vari, "csv", sep=".") as the file argument to write.table
What are these next actions supposed to do after the file is written?  
Are you trying to store a group of related "w" objects that will later  
be indexed in sequence? If so, then a list would make more sense.