[R] reading a specific part of a text file into R

Berend Hasselman bhh at xs4all.nl
Sun Mar 17 09:08:21 CET 2013


On 17-03-2013, at 06:23, Sedat Sen <sedatsen06 at gmail.com> wrote:

> I was wondering if it is possible read a specific part of a text file in R
> without importing whole file.
> 
> For example, I want to read a number where is located on the line 30 and
> columns between 2 and 4. Say the number is 456. can I see it without
> opening the file. I want to learn how to do this because I am doing many
> analyses which result in the same style output. I just need to read only
> one line in these outputs.
> 
> 
> Is there any specific function for this purpose? I googled it but did not
> find anything helpful.


Googling for what?
Googling on "R read lines" gives a lot.

Look at

?readLines

Berend



More information about the R-help mailing list