[R] replace a few strings in a text file

2008-10-27 Thread baptiste auguie
Dear all, I wrote a wrapper to a FORTRAN program using R. The main program uses a text file (~200 lines) as an input describing the simulation to be run. I typically generate the file once with the right parameters using a combination of file(), paste(), cat(). This is fine, and it

Re: [R] replace a few strings in a text file

2008-10-27 Thread Duncan Murdoch
baptiste auguie wrote: Dear all, I wrote a wrapper to a FORTRAN program using R. The main program uses a text file (~200 lines) as an input describing the simulation to be run. I typically generate the file once with the right parameters using a combination of file(), paste(), cat().

Re: [R] replace a few strings in a text file

2008-10-27 Thread baptiste auguie
First of all, let me apologize for the 200 files that would result from running my minimal example. I've just realised this on my Desktop; it seems i overlooked the arguments passed to sapply(). Thank you for your reply Duncan, I realize now my approach was quite silly. It is indeed much