Number of unique values per feature
Value
Named integer vector of length NCOL(x) with number of unique values per column/feature, invisibly.
Examples
library(data.table)
ir <- as.data.table(iris)
dt_nunique_perfeat(ir)
#> Sepal.Length: 35
#> Sepal.Width: 23
#> Petal.Length: 43
#> Petal.Width: 22
#> Species: 3