Skip to content
Prev 244495 / 398506 Next

lapply getting names of the list

On Dec 9, 2010, at 2:21 PM, David Winsemius wrote:

            
Those were not tabs after being processed by various portions of the  
various mail systems.
See if this works any better:

lapply(infile.split,function(x){
             filename <- deparse(substitute(x))   # this is the way to  
recover the "names" of arguments
             final_filename <- paste(filename,"toy_set.txt", sep="_")
             write.table(x, file = paste("", final_filename,sep="/"),  
row.names=FALSE, quote=FALSE,sep="\t")
} )


I substituted "" for that path variable that you didn't provide, put  
in a missing ")" in the write.table file=paste() that wasmissing,  and  
I substituted regular double quotes for those damnable smart-quotes  
that _your_ mailer inserted.