From smyth at wehi.edu.au  Wed Jul 27 10:55:02 2005
From: smyth at wehi.edu.au (Gordon Smyth)
Date: Wed, 27 Jul 2005 18:55:02 +1000
Subject: [Rd] R 2.1.1: read.table processes C-style escapes (PR#8037)
In-Reply-To: <Pine.LNX.4.61.0507270813520.21618@gannet.stats>
References: <6.2.1.2.1.20050727141319.021c8c40@imaphost.wehi.edu.au>
	<Pine.LNX.4.61.0507270757580.21618@gannet.stats>
	<6.2.1.2.1.20050727170703.021d08d8@imaphost.wehi.edu.au>
	<Pine.LNX.4.61.0507270813520.21618@gannet.stats>
Message-ID: <6.2.1.2.1.20050727175222.021f8298@imaphost.wehi.edu.au>

At 05:21 PM 27/07/2005, Prof Brian Ripley wrote:
>On Wed, 27 Jul 2005, Gordon Smyth wrote:
>
>>Thanks for the reply. Apologies for checking only R patched rather than 
>>R-devel.
>>
>>I guess that this means that someone must have a use for 
>>allowEscapes=TRUE when read reading a file in table format into a data 
>>frame. It is hard to imagine.
>
>Octal and hex escapes are a common way to cope with different encodings.

Thanks.

>I would not want R limited by the imagination of a single user, let alone 
>a Windows-only user.

Oct and hex escapes are not the only uses of backslashes in the computing 
world, and not only in Windows. TeX markup is one example. In the 
bioinformatics world, a great variety of ways are used to represent gene 
annotation information in text files, some of them including backlashes. I 
find that people find ways to throw all sorts of things at my code.

If 'allowEscapes=FALSE' was the default in read.table, then all legacy code 
using read.table() would continue to behave as in the past. With 
'allowEscapes=TRUE', all code ever written which uses read.table(), and 
which has to cope with backslashes which are not octal or hex escapes, will 
now be broken. This is not in any sense a complaint, nor a wish that R 
should remain static or be limited by my imagination. Just a plea that, 
other things being equal, not breaking legacy code will be a consideration.

Gordon



[Rd] R 2.1.1: read.table processes C-style escapes (PR#8037)
Gordon Smyth