This function calculates the number of values in a vector that are not NA.
notNA(x, big.mark = NULL, scientific = FALSE, ...)
This function just shorthand for sum(!is.na(x))
, with a shorter name for reference in the vtable
or sumtable
summ
option.
If big.mark
is specified, will return a formatted string instead of a number, where the formatting is based on format(x, big.mark = big.mark, scientific = FALSE, ...)
.
x <- c(1, 1, NA, 2, 3, NA)
notNA(x)
#> [1] 4
notNA(1:10000, big.mark = ',')
#> [1] "10,000"