----------------------------------------
> From: santosh.srini...@gmail.com
> To: karthick.laksh...@gmail.com; r-help@r-project.org
> Date: Wed, 10 Nov 2010 16:00:26 +0530
> Subject: Re: [R] Parsing txt file
>
> You could use the following to achieve your objective. To start with
>
> ?readLines
> ?strsplit
> ?for
> ?ifelse
>
> As you try, you may receive more specific answers for the issues you come up
> with.

If you don't have some compelling reason to do it in R, it may be worth
the learning curve to get something like awk, perl, or even sed.
These tasks come up in many settings and these tools are quite verstatile
for ad hoc text manipulation. You can save your reformatted text
file in a form that is easy for R.


>
> -----Original Message-----
> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
> Behalf Of karthicklakshman
> Sent: 10 November 2010 15:06
> To: r-help@r-project.org
> Subject: [R] Parsing txt file
>
>
> Hello,
>
> I have a tab limited text document with multiple lines as mentioned below,
>
>
> ______________________________________________
> R-help@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.
>
> ______________________________________________
> R-help@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.
                                          
______________________________________________
R-help@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.

Reply via email to