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