Re: [R] Search a string and modify it in a .txt file

2008-05-21 Thread jim holtman
Here is an example of how to create the init files: x <- read.table(textConnection(" PA1 PA2 PA3 PB1 j=1 122 15 j=2 103 24 j=3 114 36"), header=TRUE) closeAllConnections

Re: [R] Search a string and modify it in a .txt file

2008-05-21 Thread jim holtman
Instead of trying to modify the file, why not generate it from the data that you have. Is the array in your mail an example of one of many that have the configuration data? If so, why don't you just create the output file from that data. You can just loop through and do 'writeLines' to create th

[R] Search a string and modify it in a .txt file

2008-05-21 Thread Romain
Hi there, I use R and I would like to be able to modify a file .txt "init_file" like this one : # # # Parameters A # # # Parameter 1 PA1 = 15