From mwkimpel at gmail.com  Mon Feb 12 17:37:59 2007
From: mwkimpel at gmail.com (Mark W Kimpel)
Date: Mon, 12 Feb 2007 11:37:59 -0500
Subject: [Rd] newline with cell of Excel worksheet created with write.xls
In-Reply-To: <47fce0650702120207k39e014a9wd46a48b9fb698ae3@mail.gmail.com>
References: <45CC201C.9060600@gmail.com>
	<47fce0650702120207k39e014a9wd46a48b9fb698ae3@mail.gmail.com>
Message-ID: <45D097E7.2000004@gmail.com>

Hans-Peter,

I agree, I wasn't sure whether to put this stuff on-list or not. I have 
seen some people request that things NOT be taken of list because then 
the answers are not available to everybody. Let's solve some of these 
issues ourselves (I am willing to help) and, if appropriate, repost the 
solutions or additional functionality to the list.

Mark

Hans-Peter wrote:
> Hi Mark,
> 
> You need a character vector or a data.frame for separate rows. Something 
> like:
> 
> longtext <- 'akdf kadf? \nkad flkd?flkadfk dafk \nlakdf
> kdjfkjdfkjadfk\njadfkjdflk adf'
> (rowtext <- as.data.frame( strsplit( longtext, split = "\n" )) )
> 
> may do this.
> 
> Regards,
> Hans-Peter
> 
> 
> PS: Probably not so appropriate for the R-devel list either...
> 
> 
> 2007/2/9, Mark W Kimpel <mwkimpel at gmail.com>:
>> As part of my project to put different types of results into worksheets,
>> I would like to be able to put an auto-generated methods section. If I
>> compose in RWinEdt, read into R, and use write.table with a .txt file
>> extension, what I get out has line-breaks that correspond to those I put
>> in in the first place.
>>
>> If I do the same thing but write.xls with .xls extention, I get an Excel
>>   worksheet with the entire paragraph on one line (row). It seems to me
>> that Excel uses a special character for new-lines (new-rows). Is there a
>> way that write.xls could convert \n to this special character?
>>
>> I'm  writing lots of posts on this, but trying to break up the subjects
>> to create better threads.
>>
>> Mark
>>
>> -- 
>> Mark W. Kimpel MD
>> Neuroinformatics
>> Department of Psychiatry
>> Indiana University School of Medicine
>>
> 

-- 
Mark W. Kimpel MD
Neuroinformatics
Department of Psychiatry
Indiana University School of Medicine



[Rd] newline with cell of Excel worksheet created with write.xls
Mark W Kimpel