nuniq: Number of unique values in a vector

View source: R/helpers.R

nuniqR Documentation

Number of unique values in a vector

Description

This function takes a vector and returns the number of unique values in that vector.

Usage

nuniq(x)

Arguments

x

A vector.

Details

This function is just shorthand for length(unique(x)), with a shorter name for reference in the vtable or sumtable summ option.

Examples

x <- c(1, 1, 2, 3, 4, 4, 4)
nuniq(x)


vtable documentation built on Oct. 26, 2023, 5:08 p.m.