factoextra
factoextra copied to clipboard
Bug in `fviz_nbclust` function
Hi,
I was trying to run fviz_nbclust
function on a NbClust-derived list (actually, I was following this tutorial) which returned this error:
Error in if (class(best_nc) == "numeric") print(best_nc) else if (class(best_nc) == : the condition has length > 1
I am trying to edit this function but it turned to be not easy at all. What I suggest is to edit class(best_nc) == "anyClass"
with any(class(best_nc) == "anyClass")
, because this would clearly solve the problem.
Have a nice day, Giusepe
I've had the same issue. I agree with the suggested edit.
Same here and the proposed Edition works perfectly. Cheers