length2 | R Documentation |
Replacement for length(). Finds count of items like length(), but if set na.rm=TRUE then it doesn't count the items that are NA
length2(x, na.rm = FALSE)
x |
A vector, required. |
na.rm |
Logical value, optional, FALSE by default. Should NA values be left out of the count? |
Returns a single number.
length2(c(1,2,3,NA))
length2(c(1,2,3,NA), na.rm=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.