notNA {vtable} | R Documentation |
Number of nonmissing values in a vector
Description
This function calculates the number of values in a vector that are not NA.
Usage
notNA(x, big.mark = NULL, scientific = FALSE, ...)
Arguments
x |
A vector. |
big.mark |
Argument to pass to |
scientific |
Argument to pass to |
... |
Other arguments to pass to |
Details
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, ...)
.
Examples
x <- c(1, 1, NA, 2, 3, NA)
notNA(x)
notNA(1:10000, big.mark = ',')
[Package vtable version 1.4.6 Index]