lunique: Number of elements in a vector.

Description Usage Arguments Value See Also Examples

View source: R/utils.R

Description

lunique returns the number of non-NA unique elements and lna returns the number of NAs.

Usage

1
2
3
lunique(x)

lna(x)

Arguments

x

A vector.

Value

A non-negative integer.

See Also

length(), unique(), is.na()

Examples

1
2
3
x <- sample(c(1:3, NA), 10, replace = TRUE)
lunique(x)
lna(x)

lvmisc documentation built on April 5, 2021, 5:06 p.m.