powered by
Number of unique values per feature
dt_nunique_perfeat(x, excludeNA = FALSE, limit = 20L, verbosity = 1L)
Named integer vector of length NCOL(x) with number of unique values per column/feature, invisibly.
NCOL(x)
data.table: Input data.table.
Logical: If TRUE, exclude NA values.
Integer: Print up to this many features. Set to -1L to print all.
Integer: If > 0, print output to console.
EDG
library(data.table) ir <- as.data.table(iris) dt_nunique_perfeat(ir)
Run the code above in your browser using DataLab