From ripley at stats.ox.ac.uk  Sat Dec 29 14:38:18 2007
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Sat, 29 Dec 2007 13:38:18 +0000 (GMT)
Subject: [Rd] (PR#10534 capture.output(),
 truncated last output without \n
In-Reply-To: <47764114.7090400@sciviews.org>
References: <20071229111526.1015E2834619@mail.pubhealth.ku.dk>
	<Pine.LNX.4.64.0712291151440.21325@gannet.stats.ox.ac.uk>
	<47764114.7090400@sciviews.org>
Message-ID: <Pine.LNX.4.64.0712291311030.23569@gannet.stats.ox.ac.uk>

On Sat, 29 Dec 2007, Philippe Grosjean wrote:

> Thank you, Brian.
>
> Prof Brian Ripley wrote:
>> This only happens if 'file' is a text connection, and is the expected 
>> behaviour in that case: you cannot capture an incomplete line to a text 
>> connection.
>
> Well, in ?textConnection, Details section, one can read:
> "Closing the connection will output the final line, complete or not."

Yes, but 'rval' is returned before the connection is closed.

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



[Rd] (PR#10534 capture.output(), truncated last output without \n
Prof Brian Ripley