Number of Distinct Elements

Description

Count the number of distinct elements in a vector or a matrix.

Usage

1

Arguments

x

a vector or a matrix.

Value

A scalar giving te number of distinct elements in x.

Author(s)

Antoine Filipovic Pierucci

Examples

1
nDistinct(c(1, 3, 3, 5))