Skip to content
Prev 176609 / 398503 Next

R File I/O Capability - Writing output to specific lines of existing file

You can always read in the initialization file, make the updates to it
and then write it back out.  If it is a text file, it would be very
hard to write into the middle of it since there is no structure to the
file.  You can read it in as a table (read.table) or just as lines
(readLines) and the make any changes you want.  You can use regular
expressions if you want to put something in the middle of one of the
lines you have read in.
On Wed, Apr 8, 2009 at 10:13 AM, Jason Rupert <jasonkrupert at yahoo.com> wrote: