I can't apply my data to cluster
My code: SCRIPT_INT(
'set.seed(20);
result <- kmeans(data.frame(.arg1,.arg2,.arg3),3);
result$cluster; ',
sum([Sales]),sum([Unit]),SUM([Number of Records])
This is my problem.
There is a similar question asked and answered here: K-Means Cluster with R
Check it out, it may help.
There are 2 suggestions in it:
1. (Marked as answer) It was suggested that the table calculation was sending data to R one row at a time - check it out and correct if this is the case
2. Using result <- kmeans(x = data.frame(.arg1,.arg2,.arg3), 1, iter.max = 10