Skip to content
Back to formatted view

Raw Message

Message-ID: <971536df1001060844w29c5ac5dq242e214d9d05b940@mail.gmail.com>
Date: 2010-01-06T16:44:06Z
From: Gabor Grothendieck
Subject: Write a blank line to CSV
In-Reply-To: <8c784a411001060836p22a261ceka41c0ee6bce06105@mail.gmail.com>

Try this:

cat("\n", file = "tables.csv", append = TRUE)


On Wed, Jan 6, 2010 at 11:36 AM, Krishna Tateneni <tateneni at gmail.com> wrote:
> Greetings and happy new year!
>
> I'm attempting to write a series of tables to a CSV file, and would like to
> insert a blank line after each table. To do this, I use:
>> write.csv(NULL,"tables.csv",append=T)
> which appears to work, except that this warning is thrown:
>> Warning message:
>> In write.table(NULL, "tables.csv", append = T, col.names = NA, ?:
>> appending column names to file
> I tried col.names=F in the write.csv call, but the argument is ignored,
> presumably because NULL does not have col.names.
>
> Is there a better way to insert the blank lines? ?Many thanks for
> enlightening me!
>
> --Krishna