Re: [R] Changing a value in a particular row and column within a text file

2010-12-17 Thread Mauricio Zambrano
Thank you very much for all your help. Following your advice, I solved my problem by using the following: ## lines<- readLines("myFile.txt") myline <- lines[myrow] L <- nchar(myline) substr(myline, Col.Ini, Col.Fin) <- NewValue lines[myrow]

Re: [R] Changing a value in a particular row and column within a text file

2010-12-17 Thread Petr Savicky
On Fri, Dec 17, 2010 at 01:49:23AM -0800, T.V. Nguyen wrote: > On 17 Dec 2010, at 01:13, Mauricio Zambrano wrote: [...] > > but some text, and I now exactly the row that has to be modified and > > the columns within that row that have to be changed with a new > > numerical value. [...] > You can ei

Re: [R] Changing a value in a particular row and column within a text file

2010-12-17 Thread Jim Lemon
On 12/17/2010 08:13 PM, Mauricio Zambrano wrote: Dear list, I need to change a value within a particular line of a plain text file with characters and numbers, and I haven't found any way of doing this by using R. What I have a is a file that doesn't have tabular data (so, I think that 'read.ta

Re: [R] Changing a value in a particular row and column within a text file

2010-12-17 Thread Duncan Murdoch
Mauricio Zambrano wrote: Dear list, I need to change a value within a particular line of a plain text file with characters and numbers, and I haven't found any way of doing this by using R. What I have a is a file that doesn't have tabular data (so, I think that 'read.table' or 'read.delim' are

Re: [R] Changing a value in a particular row and column within a text file

2010-12-17 Thread T.V. Nguyen
On 17 Dec 2010, at 01:13, Mauricio Zambrano wrote: > Dear list, > > I need to change a value within a particular line of a plain text file > with characters and numbers, and I haven't found any way of doing this > by using R. > > What I have a is a file that doesn't have tabular data (so, I thin

[R] Changing a value in a particular row and column within a text file

2010-12-17 Thread Mauricio Zambrano
Dear list, I need to change a value within a particular line of a plain text file with characters and numbers, and I haven't found any way of doing this by using R. What I have a is a file that doesn't have tabular data (so, I think that 'read.table' or 'read.delim' are not the right tools for th