[Rd] Patch to allow negative argument in head() and tail()

From: Vincent Goulet <vincent.goulet_at_act.ulaval.ca>
Date: Mon 17 Jul 2006 - 19:03:34 GMT

Dear developeRs (and other abuseRs ;-),

I would like to contribute a patch against functions head() and tail() of package utils to allow for a negative 'n' argument. This allows to extract all but the first/last 'n' elements/rows/lines of an object, similar to the "drop" operator of APL. [1]

I put the patched head.R and head.Rd files, along with diff files in


The differences were obtained against today's version of r-devel (more specifically revision 30277 of head.R and revision 30915 of head.Rd).

Some comments:

I hope you will find my (albeit small) contribution useful.

Best regards,

[1] See previous messages to r-devel by myself <https://stat.ethz.ch/pipermail/r-devel/2005-April/032881.html> and Bill Venables
  Vincent Goulet, Associate Professor
  École d'actuariat
  Université Laval, Québec 
  Vincent.Goulet_at_act.ulaval.ca   http://vgoulet.act.ulaval.ca

R-devel@r-project.org mailing list
Received on Tue Jul 18 19:09:37 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Tue 18 Jul 2006 - 10:27:34 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.