adding header info to write.table
You know...I almost added this to your original post because I thought
you might want to read something back into ArcInfro when you were done!
Look at ?files
The easiest thing to do in R is to keep your header as a text file in
the working directory and then append it to your output file using
'file.append'
write.table(your output file)
file.copy("header.txt", "final.output.txt")
file.append("final.output.txt", "output.dat")
Using 'paste' for the file names makes this easy and flexible.
HTH, Andy
-----Original Message----- From: r-help-bounces at stat.math.ethz.ch [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of femke Sent: Thursday, February 26, 2004 2:16 PM To: r-help at stat.math.ethz.ch Subject: [R] adding header info to write.table Hello, Could someone please tell if there is a way to append header info to the top of an exported dataframe (exported with write.table). I want to append the following, which are the defininitions for an asciigrid: ncols 532 nrows 999 xllcorner 510465 yllcorner 4766375 cellsize 30 NODATA_value -9999 Thanks very much, femke [[alternative HTML version deleted]]
______________________________________________ R-help at stat.math.ethz.ch mailing list https://www.stat.math.ethz.ch/mailman/listinfo> /r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html