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

From: William Dunlap <wdunlap_at_tibco.com>
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
wdunlap tibco.com

> -----Original Message-----
> From: r-devel-bounces_at_r-project.org [mailto:r-devel-bounces_at_r-project.org] On Behalf
> Of Ravi Varadhan
> Sent: Thursday, April 19, 2012 11:13 AM
> To: r-devel_at_r-project.org
> 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
> rvaradhan_at_jhmi.edu<mailto:rvaradhan_at_jhmi.edu>
> 410-502-2619
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-devel_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel 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 https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive