r - Why is dataset[, uniqueN(x)] in data.table not returning the correct count of unique values within variables in RStudio? -


i working dataset has 379561 instances , 75 variables. want calculate summary statistics(mean, standard deviation, #outliers,range) data. variables of type (numeric, integer , categorical). because comparatively large data set, conventional code taking time. decided go data.table package in r. dataset has binary coded (0 1 variables) variables want treated categorical. writing function counts unique entries in each variable , if #unique entries < 10, want treat particular variable categorical. have written following code. returns count 1 variables. have attachedenter image description here code.

thank , if possible, suggest me alternative data.table.


Comments

Popular posts from this blog

php - Permission denied. Laravel linux server -

google bigquery - Delta between query execution time and Java query call to finish -

python - Pandas two dataframes multiplication? -