Skip to content
Prev 360211 / 398503 Next

Sum of Numeric Values in a DF Column

... and a slightly more efficient non-dplyr 1-liner:
function(x)sum(as.numeric(x), na.rm=TRUE))

[1] 105  67  60 100  80

Cheers,
Bert
Bert Gunter

"The trouble with having an open mind is that people keep coming along
and sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
On Mon, Apr 18, 2016 at 10:43 AM, Bert Gunter <bgunter.4567 at gmail.com> wrote: