powered by
Return the sum of `x`. If no observations, return `NA`. This is a workaround for the fact that in data.table, `:= sum()` will return `NaN` where there are no observations
sum_na(x)
data potentially with non-finite values
Sum of the input
# NOT RUN { sum_na(c(1,2,3,NA)) # 6 # }
Run the code above in your browser using DataLab