Error in clara(df, k = i, correct.d = TRUE) : C level dysta2(): nsel[k= 0] = 0 is outside 0..n, n=161
I found the error message here (previous version of the package source code, lines 341 to 346): cluster/clara.c at master · pimentel/cluster · GitHub
I tried to check with logging.
cat(paste0('k = ', i, ' < ', nrow(df), '\n'))
k = 4 < 161 k = 5 < 161
Am I missing something?