clearLog();
// Lets say you are staring with something like this
// point(row) -> Cluster List
// p1 = {1,4,6,8};
// p2 = {2,9,6,4,1,7};
// p3 = {3,2,5};
// When you are generating you initial cluster lists (I presume you iterate over your table rows)
// add them to an Associative Array on the fly.
// clusterAa = associativeArray();
// while(iterating over your points and lists,
// clusterAa["p1"] = {1,4,6,8}; // The key here is a String but could be an Integer, value = cluster list
// e.g. clusterAa[row] = Cluster List;
// );
// Jumping forward you should have an array like this.
clusterAa = associativeArray({
{"p1", {1,4,6,8}},
{"p2", {2,9,6,4,1,7}},
{"p3", {3,2,5}}
});
listOfPoints = clusterAa << getKeys; // Get the keys as a list {"p1", "p2", "p3"}
i=1;
listOfClusterLists = {};
while(i <= nItems(listOfPoints), // Iterate over the list and add to a linal list
insertInto(listOfClusterLists, evalList(list(clusterAa[listOfPoints])));
i++;
);
show(listOfClusterLists);
// Result = listOfClusterLists = {{1, 4, 6, 8}, {2, 9, 6, 4, 1, 7}, {3, 2, 5}};
Of course you could also try the Clustering Tool under the Multivariate Methods tab in JMP. I've had some reasonable success doing K-Means clustering using this tool.