Learn R Programming

kim (version 0.6.1)

lenu: lenu: Length of unique values

Description

Extract unique elements and get the length of those elements

Usage

lenu(x = NULL)

Value

a vector, data frame, or array-like 'x' but with duplicate elements/rows removed.

Arguments

x

a vector or a data frame or an array or NULL.

Examples

Run this code
unique(c(10, 3, 7, 10))
lenu(c(10, 3, 7, 10))
unique(c(10, 3, 7, 10, NA))
lenu(c(10, 3, 7, 10, NA))
lenu(c("b", "z", "b", "a", NA, NA, NA))

Run the code above in your browser using DataLab