[R] csv file with two header rows

analyst41 at hotmail.com analyst41 at hotmail.com
Sat Apr 27 15:47:30 CEST 2013



On Apr 26, 8:17 pm, David Winsemius <dwinsem... at comcast.net> wrote:
> On Apr 25, 2013, at 6:35 PM, analys... at hotmail.com wrote:
>
> > Is there a way to use read.csv() on such a file without deleting one
> > of the header rows?
>
> What do you mean by "one of the header rows"?
> --
>
> David Winsemius
> Alameda, CA, USA
>

The file is imported from an external source and for some reason there
are two header rows each with a set of names for the columns.  It
would get refreshed from time to time amd I don't want to have to
remember to remove one of them by hand (its a huge file and its not
easy to get it into an editor) each time before R processing.

But the skip option suggested by the other posters did the job -
thanks to all (and it turns out the second set of names is more
English-like anyways).
> ______________________________________________
> R-h... at r-project.org mailing listhttps://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guidehttp://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list