I have 18 datasets, for each dataset i must perform k-mean apart. For reproducible example. let\'s provide two datasets to explain my problem.
data1=structure(li