I'd be willing to take a stab at implementing it (partly because I'd love to have it, partly to better understand Rcpp internals and template witchcraft). Is this possible and would such a PR be welcome?
Fair question. For some of Sugar a distinction was made between checking for NA / NaN and assumming the data was clean.
This file is part of a rewrite / extension of (at least some aspects of) sugar by @dcdillon which ties into other things he has done / is doing with iterator based algos. That said, I have no real idea what we could / should / would / will do here.
I don't see any reason NOT to do it provided original functionality remains in tact.
Cool. Like I said, I'd be willing to have a go at it in order to learn, although I'm sure @dcdillon would be able to do so much faster.
Longer term, I'm interested in adding some common operations to Algorithms, many of which are already available in Sugar (e.g. mean(), var(), all(), any(), etc.). I have a project where the input is always a *Vector::iterator rather than a *Vector and my understanding is that this is the way to go about computing such summaries (please correct me if I'm mistaken).
Oh I see beers between @PeteHaitch and @dcdillon in the future... ;-)
This got stale so lemme close this one too.
No worries. I do hope to return to this when time allows.