I am new to this community. I am running the R Programming script in tableau and I got the error shown in the below screenshot.
I did the below before I run the script in tableau.
Help ->Settings and Performance-> Manage R connection -> In Rserve connection window : server=localhost Port: 6311
I got the message saying "Successfully connected to the Rserve service".
Then I created the field called "R Cluster" with the below code:
result <- kmeans(x = data.frame(.arg1,.arg2,.arg3,.arg4), 3);
I got the error shown in the below screenshot. Please suggest me how to resolve this error.
are you using the standard Sepal dataset in R to learn R for tableau? The issue you are having is in the arguments you have passed the clustering calculation in R, meaning you are asking for more clusters than there are points, this is because it is a table calculation so is aggregating the values sent to R.
Try unticking 'Aggregate Measures' in the Analysis menu.