Re: [Rd] RFC: "loop connections"

From: Prof Brian Ripley <>
Date: Sat 27 Aug 2005 - 08:23:37 GMT

On Sat, 27 Aug 2005 wrote:

> Gabor Grothendieck <> wrote:
>> OK. I guess you want one of the core people to respond but in the

One has.

>> interim can you explain the terminology "loop"?
>> Also, do you have any prototypical applications in mind?
> "loop" is short for "loopback". A loop or loopback device is one that
> just returns the data sent to it.

That is definitely not what text connections do, and not what I read the proposal as being given the analogies to text connections.

> The prototypical applications are the same sort of applications text
> connections are used for: data transformation,

That I think is where Hinds' confusion arises. As the posting guide asks, please do your homework before posting.

Text connections are from the Green Book, where they are described as

They are read-only (or in R but not S, write-only). Think for them as the analogues of the C functions sscanf and sprintf. Output text connections are a particularly convenient way to create text labels -- see for example capture.output().

> in this case of raw binary data, rather than formatted text data. In my
> case, I needed to interpret a "long raw" column from an Oracle table,
> that consisted of packed single precision floating point numbers.

That is exactly what read-write anonymous file() connections are designed for. They too come from the Green Book. (If efficiency were an issue, a short purpose-designed C routine would be the answer. But file connections are already much 'smarter' than the proposed implementation of loop connections and do allow seeking.)

Another piece of homework might be my article in the very first R newsletter.

Brian D. Ripley,        
Professor of Applied Statistics,
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________ mailing list
Received on Sat Aug 27 18:28:00 2005

This archive was generated by hypermail 2.1.8 : Mon 20 Feb 2006 - 03:21:19 GMT