[R] Using R to create pdf's from each file in a directory

Patrick Connolly p_connolly at ihug.co.nz
Sun Apr 22 22:19:07 CEST 2007


On Fri, 20-Apr-2007 at 11:10PM -0500, Jeffrey Horner wrote:


|> workdir <- '/tmp/data'
|> for (x in dir(workdir,pattern='.csv$')){
|>    d <- read.table(paste(workdir,'/',x,sep=''), sep="\t", header=TRUE)

If they're CSV files, I don't think sep = "\t" will be correct. Try ","

best

-- 
~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.   
   ___    Patrick Connolly   
 {~._.~}          		 Great minds discuss ideas    
 _( Y )_  	  	        Middle minds discuss events 
(:_~*~_:) 	       		 Small minds discuss people  
 (_)-(_)  	                           ..... Anon
	  
~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.



More information about the R-help mailing list