From D.A.Wooff@Durham.ac.uk  Mon Jan 24 09:59:20 2000
From: D.A.Wooff@Durham.ac.uk (David Wooff)
Date: Mon, 24 Jan 2000 09:59:20 +0000
Subject: tabulate
References: <200001230026.LAA16510@snowy.nsw.cmis.CSIRO.AU>
Message-ID: <388C2278.EF4119E1@Durham.ac.uk>

Bill Venables wrote:
> 
> > Dear R-Developers,
> >
> > Would it be possible / is it desirable to alter tabulate
> > so that the lower boundary
> > can be set in addition to the upper boundary? eg,
> >
> > tabulate(bin, low=min(1,bin), nbin=max(1,bin))
> >
> > would silently ignore elements outside the range low..nbin
> >
> > It is easy to get around this at present, of course,
> > but seems natural to have a more flexible function.
> > [or should I be using another function?]
> 
> I would oppose it on the grounds that tabulate() is a low-level
> function and making a change like this is likely to slow it down
> (if marginally) and to hinder porting software from R to S, which
> I regard as an important consideration, if not an over-riding one.
> 
> table() should be the usual function for everyday use (and using
> this makes the change to tabulate() unnecessary), but on R the
> difference in speed between table() and tabulate() can be
> dramatic.  I would suggest improving the efficiency of table()
> should be a fairly high priority.
> 


As far as I know, tabulate appears to have the advantage [for some of my 
tasks] of not excluding bins with zero counts. Otherwise, I would use
table.

David.

-- 
  David Wooff, Director, Statistics and Mathematics Consultancy Unit,
  Department of Mathematical Sciences, University of Durham.
  Science Laboratories, South Road, Durham, DH1 3LE, UK.
  Tel. 0191 374 4531, Fax 0191 374 7388.
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


tabulate
David Wooff