Learn R Programming

taRifx (version 1.0.6.2)

distinct: Returns number of distinct observations in each column of a data frame or in a vector

Description

Returns number of distinct observations in each column of a data frame or in a vector

Usage

distinct(input, na.rm = TRUE)

Arguments

input

data.frame or vector

na.rm

remove nas or not

Value

Num of distinct obs

Examples

Run this code
# NOT RUN {
x <- sample(letters[1:3],10,replace=TRUE)
#distinct(x)
# }

Run the code above in your browser using DataLab