Returns NA_real_ if all values are NA; otherwise returns the sum with
missing values treated as zero.
Value
A single numeric value: NA_real_ if all values in x are missing,
otherwise the numeric sum with NAs ignored.
Details
This is useful in dplyr::summarise() calls where you want a sum that
respects full-missing groups by yielding NA_real_, and otherwise sums while
ignoring NAs.
