Re: [R] how to skip certain rows when reading data

From: Gabor Grothendieck <ggrothendieck_at_gmail.com>
Date: Fri 28 Jul 2006 - 04:23:39 EST

Just read them in and throw them away:

   read.table("myfile.dat", ...whatever...)[-c(10, 12), ]

On 7/27/06, jz7@duke.edu <jz7@duke.edu> wrote:
> Dear all,
>
> I am reading the data using "read.table". However, there are a few rows I
> want to skip. How can I do that in an easy way? Suppose I know the row
> number that I want to skip. Thanks so much!



R-help@stat.math.ethz.ch 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 Jul 28 04:29:20 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Fri 28 Jul 2006 - 06:17:23 EST.

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