Re: [R] re ading and analyzing a text file

From: Ted Harding <Ted.Harding_at_manchester.ac.uk>
Date: Fri, 16 May 2008 15:45:11 +0100 (BST)


On 16-May-08 14:35:18, Yasir Kaheil wrote:

> 
> use the parameter 'skip' in read.table
> 
> dat<-read.table("filename",skip=number of rows you want to skip)
> 
> thanks
> y

Or, ironically, you can use scan(...,skip=number of rows to skip)! See ?scan.

Best wishes,
Ted.

> DAVID ARTETA GARCIA wrote:

>>
>> Dear list,
>>
>> I have a text file from a scanner that includes 20 lines of text
>> (scanner settings) before it actually starts showing the readings in a
>> tabular format (headings are ID, intensity, background and few
>> others).
>>
>> I am a biologist with some experience using R and my question is if it
>> is possible to read this file into an R workspace and store the actual
>> readings in a dataframe, avoiding the text at the begining. It seems
>> to me that this is not the actual purpose of R, but maybe someone can
>> point me to a method for doing this. Do I need to parse the file with
>> some other programming language? is it possible to link, say, Perl or
>> C++ with R to automate the reading and the analysis of such files? The
>> aim is to be able to automate this analysis since these files are our
>> routine experimental output.
>>
>> Thanks for your help,
>>
>> D.
>>
>> ______________________________________________
>> 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.
>>
>>
> 
> 
> -----
> Yasir H. Kaheil
> Catchment Research Facility
> The University of Western Ontario 
> 
> -- 
> View this message in context:
> http://www.nabble.com/reading-and-analyzing-a-text-file-tp17276177p17276
> 263.html
> Sent from the R help mailing list archive at Nabble.com.
> 
> ______________________________________________
> 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.

--------------------------------------------------------------------
E-Mail: (Ted Harding) <Ted.Harding_at_manchester.ac.uk> Fax-to-email: +44 (0)870 094 0861
Date: 16-May-08                                       Time: 15:45:05
------------------------------ XFMail ------------------------------

______________________________________________
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. Received on Fri 16 May 2008 - 15:27:12 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 16 May 2008 - 15:30:37 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive