Why in kclust =, it needs to use ~ and .x? How's this exactly applied? Meanwhile, bellow
in augmented =, it only applies the column name points in map(kclust, augment, points)?
Because in the first case, the mapped variable needs to be used as the second argument for the kmeans() function, so if you need to specify the order you need to use the . x placeholder, whereas in the second case, the mapped variable goes to the first argument so no need to specify the order.