[R] skip first line with read.table (was: no subject)

Hotz, T. th50 at leicester.ac.uk
Tue Jul 15 16:17:21 CEST 2003


Dear Michael,

There was an email thread midst June 2003 on a related issue. 

The suggestions made there will certainly help you

Have a look for thread "Programcode and data in the same textfile"
(just type it into the R Site Search, and the thread will come up).

I recall that read.table() has an argument skip which allows the 
first lines to be skipped, see ?read.table for details.

The manual "R Data Import/Export" is very useful as well.

Please provide a meaningful subject that makes searching the archives easier.

HTH

Thomas


---

Thomas Hotz
Research Associate in Medical Statistics
University of Leicester
United Kingdom

Department of Epidemiology and Public Health
22-28 Princess Road West
Leicester
LE1 6TP
Tel +44 116 252-5410
Fax +44 116 252-5423

Division of Medicine for the Elderly
Department of Medicine
The Glenfield Hospital
Leicester
LE3 9QP
Tel +44 116 256-3643
Fax +44 116 232-2976


> -----Original Message-----
> From: michael kirschbaum [mailto:kirschenmichel at gmx.de]
> Sent: 15 July 2003 14:56
> To: r-help at stat.math.ethz.ch
> Subject: [R] (no subject)
> 
> 
> Hi 
> I got a problem with creating a textfile:
> how can I create a textfile, which has a headline like:
> 
> #data1
> 1 2 3 4 
> 5 6 7 8
> 
> the problem is, how to bind text and matrix, so that the
> "read.table"-function
> will ignore the text and read the numbers.
> 
> Thank you for help
> Michael 
> 
> -- 
> 2
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
>




More information about the R-help mailing list