Discussion Board for collaboration on Server-Side Extensions and Advanced Analytics Integration.
i already integrated R in Qlik Sense and used the k-means algorithm for clustering the Iris Dataset. That works perfekt, when i do it in the diagram.
When i write the following Code, R returns: "Rserve Traceback: stop("more cluster centers than distinct data points.")".
When i use the same k-means-command to color the scatter plot, it works fine.
This is my script:
"sepal length" as seplen,
"sepal width" as sepwid,
"petal length" as petlen ,
"petal width" as petwid
observation as observation,
petlen as petlen,
petwid as petwid,
R.ScriptEval('kmeans(cbind(q$petlen, q$petwid), 2 , nstart = 10)$cluster ;', petlen , petwid)
Resident [Iris] ;
Any help is appreciated.