For simplicity, here I avoided nested IFs. For the moment, the idea is to set the color for the Observations belonging to cluster 1.
Doing this, I get the error message "Allocated memory exceeded" on the scatter plot, while SSEtoRserve says "more cluster centers than distinct data points".
My explanation of this is that Qlikview is passing the data to R one record at a time. Therefore, R can't calculate 3 clusters out of a single line of data. This is also confirmed by the fact that if I set the clusters variable to 1, it works.
So, I think that the correct question is: How can I pass my variables to R as a whole? I mean, just like passing the entire variable array, and not the points one by one.
And also, why is the same function working correctly with the table chart?
Sorry for the length of the post, but I hope this is clear. I am rather new with Qlikview, and I am aware that it is very likely that I am missing some importan and basic detail about the way Qlikview uses data.
This is exactly what I was looking for!! However, I guess I have to learn more about scatter plots now.. I don't understand what the expression "size" is doing. If I change the number in its definition, I can see the colors on the plot changing position between clusters, while if I remove it, the dot sizes of the clusters are affected. Also, this expression looks different from the others, as its display options are different, though not changeable.
Regarding your question, I am doing this exercise because I want to implement cluster analysis in a pre existent Qlikview project.