See:

http://tolstoy.newcastle.edu.au/R/help/03b/6094.html

On 8/2/07, Tom Cohen <[EMAIL PROTECTED]> wrote:
> Dear  List,
>
>  I have 30 data files with different numbers of lines (31 and 33) that I want 
> to skip before reading the files. If I use the skip option I can only choose 
> either to skip 31 or 33 lines. The data files with 31 lines have no blank 
> rows between the lines and the header row. How can I read the files without 
> manually checking which files have 31 respectively 33 lines ?  The only text 
> line I want to keep is the header.
>
>  Thamks for your help,
>  Tom
>
>
>  for (i in 1:num.files) {
>   a<-read.table(file=data[i],
>  ,header=T,skip=31,sep='\t',na.strings="NA")
>
>  }
>
>
>
>
>
> ---------------------------------
> Går det långsamt? Skaffa dig en snabbare bredbandsuppkoppling.
>
>        [[alternative HTML version deleted]]
>
>
> ______________________________________________
> 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.
>
>

______________________________________________
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.

Reply via email to