Message-ID: <C0284D74.6930%sdavis2@mail.nih.gov>
Date: 2006-02-27T11:32:20Z
From: Sean Davis
Subject: Adding header lines to a dataframe that is exported using write.csv
In-Reply-To: <59d7961d0602270303w663d4bcdgba060f0fd8e66b97@mail.gmail.com>
On 2/27/06 6:03 AM, "Henrik Bengtsson" <hb at maths.lth.se> wrote:
> Just a tips: When you add headers to tabulate files like yours, it is
> convenient to start each header line with a '#' (like an R comment),
> because then read.table() will not complain about the header lines.
> It is easy to strip the '#' off the header lines, i.e. grep("^#", "",
> hlines) before further parsing.
You can also use the skip argument to read.table() to skip an arbitrary
number of lines of header information.
Sean