sum_na_rm | R Documentation |
A re-coding of the sum function which returns NA if all values are NA. Normally sum(na.rm=TRUE) will return 0 if all values are NA.
sum_na_rm(x)
x |
numeric vector |
numeric vector of length 1
sum_na_rm(c(1:2, NA)) sum_na_rm(c(NA, NA))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.