From Ted.Harding at nessie.mcc.ac.uk  Sun May  1 09:07:37 2005
From: Ted.Harding at nessie.mcc.ac.uk ( (Ted Harding))
Date: Sun May  1 09:14:08 2005
Subject: [Rd] heads and tails
In-Reply-To: <B998A44C8986644EA8029CFE6396A9241B32D7@exqld2-bne.qld.csiro.au>
Message-ID: <XFMail.050501080737.Ted.Harding@nessie.mcc.ac.uk>

On 01-May-05 Bill.Venables@csiro.au wrote:
> Using head and tail recently, it occurred to me that it 
> would be very handy to have the unix convention more 
> fully, namely to allow negative values for "n" to 
> signify omission of lines rather than inclusion.
> 
> Thus head(X, -1) would mean "all but the last line" and
>       tail(X, -1) would mean "all but the first line".
> 
> Private correspondence has made me aware that this idea 
> is not new, and that there is no organised opposition to 
> it.  Moreover the code changes needed are trivial (and 
> I am happy to supply them if people want...) and no 
> presently working code would be broken.
> 
> Has the time for this admittedly minor but harmless 
> convenience feature come at last?

I would agree that this seems desirable! As well as the
"trivial code changes needed", it also needs a probably
trivial switch of viewpoint from

  "n: size for the resulting object"

to

  "n: <whatever best encapsulates the above>"

Best wishes,
Ted.


--------------------------------------------------------------------
E-Mail: (Ted Harding) <Ted.Harding@nessie.mcc.ac.uk>
Fax-to-email: +44 (0)870 094 0861
Date: 01-May-05                                       Time: 07:57:58
------------------------------ XFMail ------------------------------


[Rd] heads and tails
 (Ted Harding