Re: [Rd] Column(row)wise minimum and maximum

From: William Dunlap <>
Date: Thu, 19 Apr 2012 20:14:35 +0000

S+ has such functions with a slightly different naming convention: it puts an 's' after each function. E.g., colMaxs instead of your colMax.

 "colMaxs"      "colMeans"     "colMedians"   "colMins"      "colProds"    
 "colQuantiles" "colRanges"    "colStdevs"    "colSums"      "colVars"     
 "rowMaxs"   "rowMeans"  "rowMins"   "rowRanges" "rowStdevs" "rowSums"   "rowVars"  

It also has a similar family of functions with 'col'/'row' replaced by 'group' to handle common calls to tapply(split(x,group),summaryFunc)

  "groupAlls"       "groupAnys"       "groupMaxs"       "groupMeans"      "groupMins"      
  "groupProds"      "groupRanges"     "groupStdevs"     "groupSums"       "groupVars"    
and lower level versions of those called "igroup<Summarys>" where the group vector must be a vector of small positive integers (like tabulate's input, while the 'group<Summarys>' are like table and coerce group to be a factor).

They certainly don't need to be in the base product, but they are handy.

Bill Dunlap
Spotfire, TIBCO Software

> -----Original Message-----
> From: [] On Behalf
> Of Ravi Varadhan
> Sent: Thursday, April 19, 2012 11:13 AM
> To:
> Subject: [Rd] Column(row)wise minimum and maximum
> Hi,
> Currently, the "base" has colSums, colMeans. It seems that it would be useful to extend
> this to also include colMin, colMax (of course, rowMin and rowMax, as well) in order to
> facilitate faster computations for large vectors (compared to using apply). Has this been
> considered before? Please forgive me if this has already been discussed before.
> Thanks,
> Ravi
> Ravi Varadhan, Ph.D.
> Assistant Professor
> The Center on Aging and Health
> Division of Geriatric Medicine & Gerontology
> Johns Hopkins University
> 410-502-2619
> [[alternative HTML version deleted]]
> ______________________________________________
> mailing list
> mailing list Received on Thu 19 Apr 2012 - 20:19:08 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 19 Apr 2012 - 22:00:48 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive