Skip to contents

Combine two frequently used function together to return the length of the unique items of a vector

Usage

unique_len(.)

Arguments

.

object such as vector or names(dataframe)

Value

length of the unique items in a vector

Examples

frenchnames1 = c("Léa","Obinna","Bastien","Léa","Obinna", "Hugo", "Amélie","Louis")
unique_len(frenchnames1)
#> [1] 6