View source: R/length_omit_na.R
length_omit_na | R Documentation |
length_omitna()
counts only non-missing elements of a vector.
length_omit_na(x)
x |
Input vector. Either a vector, or something coercible to one. |
An integer
length()
counts all the elements in a vector including those that are missing (NAs).
ethnicity <- c("Hausa", NA, "Yoruba", "Igbo", NA, "Fulani", "Kanuri", "Others")
length_omit_na(ethnicity)
length(ethnicity)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.