Learn R Programming

rtemis (version 1.4.3)

dt_nunique_perfeat: Number of unique values per feature

Description

Number of unique values per feature

Usage

dt_nunique_perfeat(x, excludeNA = FALSE, limit = 20L, verbosity = 1L)

Value

Named integer vector of length NCOL(x) with number of unique values per column/feature, invisibly.

Arguments

x

data.table: Input data.table.

excludeNA

Logical: If TRUE, exclude NA values.

limit

Integer: Print up to this many features. Set to -1L to print all.

verbosity

Integer: If > 0, print output to console.

Author

EDG

Examples

Run this code
library(data.table)
ir <- as.data.table(iris)
dt_nunique_perfeat(ir)

Run the code above in your browser using DataLab