From wdunlap at tibco.com  Wed Feb 16 18:05:59 2011
From: wdunlap at tibco.com (William Dunlap)
Date: Wed, 16 Feb 2011 09:05:59 -0800
Subject: [Rd] matrixStats: Extend to arrays too (Was: Re: Suggestion:
	Adding quick rowMin and rowMax functions to base package)
In-Reply-To: <AANLkTina14Jjri3E0KOd91E1CT1_ivxCUaXZPBg4wWZA@mail.gmail.com>
References: <AANLkTikh_y74ny=Lt0Vm-tM8tj2EKNgyB3Vaup-e2De2@mail.gmail.com><yajfk4h0rq60.fsf@gmail.com>
	<AANLkTina14Jjri3E0KOd91E1CT1_ivxCUaXZPBg4wWZA@mail.gmail.com>
Message-ID: <77EB52C6DD32BA4D87471DCD70C8D70003E62D73@NA-PA-VBE03.na.tibco.com>

> -----Original Message-----
> From: r-devel-bounces at r-project.org 
> [mailto:r-devel-bounces at r-project.org] On Behalf Of Hadley Wickham
> Sent: Wednesday, February 16, 2011 7:32 AM
> To: Tim Hesterberg
> Cc: Henrik Bengtsson; r-devel at r-project.org
> Subject: Re: [Rd] matrixStats: Extend to arrays too (Was: Re: 
> Suggestion: Adding quick rowMin and rowMax functions to base package)
> 
> On Wed, Feb 16, 2011 at 2:48 PM, Tim Hesterberg 
> <timhesterberg at gmail.com> wrote:
> > For consistency with rowSums colSums rowMeans etc., the 
> names should be
> > ? ? ? ?colMins colMaxs
> > ? ? ? ?rowMins rowMaxs
> > This is also consistent with S+.
> 
> You mean rowMaxes, right?  Or is the rule to add an s, not to 
> pluralise?

In S+ we chose to just append the 's' instead of making
everyone worry about the vagarities of English spelling
and pluralization rules.  We also have 'groupAnys' and
'igroupAnys' (and should have {row,col}Anys, but we don't).

The 'igroup<Summarys>' family of functions in S+ is to the
'group<Summarys>' family as 'tabulate' is to 'table':  it
requires that the grouping variable be an integer in the
range 1:numGroups and in return gives fast results.

Having a similar family of functions for general arrays
would be nice also, but I think that specialized row* and col*
functions are good to have: data.frames only have rows and
columns and I can never remember the MARGIN number conventions
of apply and sweep.

Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com 

> 
> I think if you were writing a new package, you'd be better off a whole
> new naming convention that extended better to higher dimensions.
> 
> Hadley
> 
> -- 
> Assistant Professor / Dobelman Family Junior Chair
> Department of Statistics / Rice University
> http://had.co.nz/
> 
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
> 



[Rd] matrixStats: Extend to arrays too (Was: Re: Suggestion: Adding quick rowMin and rowMax functions to base package)
William Dunlap