Hi all!

I am using this script to automatically generate txt file (raster map in ASCII 
format) from a big txt file

 

x<-read.table("test.txt",header=T) # if headers are present in "test.txt" or 
x<-read.table("test.txt") # Actually, read.table() command skips the blank 
lines. n<-256 for (i in 1:100){ filename=paste("file_",i,".txt",sep="") 
m<-x[((i-1)*256+1):(i*256),] write.table(m,filename,row.names=F,col.names=F) } 

 

I would like to automatically add the same header with information about the 
ASCII (ncols, nrows, cell size, ecc) on every created txt file. 

Any suggestion?

 

thanks

 

Inviata da Windows Mail
        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org 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.

Reply via email to