Re: [Rd] There is pmin and pmax each taking na.rm, how about psum?

From: Matthew Dowle <mdowle_at_mdowle.plus.com>
Date: Tue, 30 Oct 2012 14:40:57 +0000

Not pdiff because i) psum(x,-y,na.rm=TRUE) would do that and ii) diff is quite unlike -. Yes, pprod too, but not pdiv (or precip) because pprod(x,y^-1,na.rm=TRUE) would dominate that.

> what about equivalent functions for ^, %%, %/%, &, and | ?

I like the suggestion, but not as useful as psum and pprod. It would probably be going too far to add those too. Plus in ?groupGeneric, under section 3, there are 7 functions listed :

    min, max, sum, prod, range, all, any

The p* would be extended to 2 more of those 7. Wouldn't make sense for prange, pall or pany. So, just psum and pprod. ^, %%, %/%, &, and | are listed in section 2, Group "ops" and seem different to sum and prod in that sense.

>> Is there a case to add psum? Or have I missed something.
>
> If psum, then why not pdiff (-), pprod (*) and precip (/) ? And
> similarly, what about equivalent functions for ^, %%, %/%, &, and | ?
>
> Hadley
>
> --
> RStudio / Rice University
> http://had.co.nz/
>



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Tue 30 Oct 2012 - 14:43:53 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 Tue 30 Oct 2012 - 21:20:49 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