Skip to content
Back to formatted view

Raw Message

Message-ID: <70DCC9AD-9F19-4E57-BDC5-9EBE153486CE@comcast.net>
Date: 2009-11-16T20:13:44Z
From: David Winsemius
Subject: Writing a data frame in an excel file
In-Reply-To: <20091116200656.GB18054@z107.de>

On Nov 16, 2009, at 3:06 PM, smu wrote:

> hello,
>
> sep="\n" will seperate each column by \n which is not what you want.
>
> I think a csv would be the best solution.
>
> write.table(yourdataframe,sep=",")

Excel will also read (and even prefers in some sense) tab delimited  
files, so:

write.table(yourdataframe, file="dataout.xls", sep="\t")



> or use write.csv directly.
>
> regards,
> stefan
>
> On Mon, Nov 16, 2009 at 11:49:28AM -0800, anna_l wrote:
>>
>> Hello, I am having trouble by using the write.table function to  
>> write a data
>> frame of 4 columns and 7530 rows. I don?t  know if I should just  
>> use a
>> sep="\n" and change the .xls file into a .csv file. Thanks in advance
>>
>> -----
>> Anna Lippel
-- 
>

David Winsemius, MD
Heritage Laboratories
West Hartford, CT