[R] Manipulate single line in textfile

jim holtman jholtman at gmail.com
Fri Apr 17 14:02:32 CEST 2009


You can also read/write portions of the text till you get to the line
you want to change, change it and then continue copying the lines.
This is what would be done with any other software approach in trying
to replace 'text' that may not be the same length.

On Fri, Apr 17, 2009 at 4:20 AM, Guillaume Filteau <filteau at unc.edu> wrote:
> Hello all,
>
> Is it possible to modify a single line in a textfile?
>
> I know it is possible to load the whole text file, do the change, and  save
> this as a new file. However, this is not practical in my case, because the
> document is huge and cannot be fully loaded in R.
>
> Any idea?
> Best,
> Guillaume
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



-- 
Jim Holtman
Cincinnati, OH
+1 513 646 9390

What is the problem that you are trying to solve?




More information about the R-help mailing list