Skip to content
Prev 44365 / 63424 Next

There is pmin and pmax each taking na.rm, how about psum?

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.
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.