Grant,

Assuming all your filenames are something like file1.txt,
file2.txt,file3.txt... And using the Mac OSX terminal app (after you cd to
the directory where your files are located...

This will strip off the 1st lines, that is, your header lines:

for file in *.txt;do
sed -i '1d'${file};
done

Then, do this:

cat *.txt > newfilename.txt

Doing both should only take a few seconds, depending on your file sizes.

Cheers!
Tom



On Mon, Aug 11, 2014 at 12:01 PM, Grant Rettke <gcr@wisdomandwonder.com>
wrote:

> On Sun, Aug 10, 2014 at 6:50 PM, John McKown
> <john.archie.mckown@gmail.com> wrote:
>
> > OK, I assume this results in a vector of file names in a variable,
> > like you'd get from list.files();
>
> Yes.
>
> > Why? Do you need them in separate data frames?
>
> I do not.
>
> > The meat of the question. If you don't need the files in separate data
> > frames, and the files do _NOT_ have headers, then I would just load
> > them all into a single frame. I used Linux and so my solution may not
> > work on Windows. Something like:
>
> Excellent point. All of the files do have the same header. I'm on OSX
> so there must be a nice
> one liner to concatenate all of the individual files, dropping the
> first line for all but the first.  Danke!
>
> ______________________________________________
> R-help@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.
>

	[[alternative HTML version deleted]]

