I am trying to integrate a Kmean cluster code in Spotfire.

Hi I am trying to integrate a Kmean cluster code in Spotfire. The package for Kmean is stats which is available in terr. But I am getting an error stating

 "TIBCO Enterprise Runtime for R returned an error: 'Error in rep(cutree(hclust(dist(x)), centers), ncol(x)) : could not find function "cutree"'.   at Spotfire.Dxp.Data.DataFunctions.Executors.LocalFunctionClient.OnExecuting(FunctionClient funcClient)   at Spotfire.Dxp.Data.DataFunctions.Executors.AbstractFunctionClient.<RunFunction>d__3.MoveNext()   at Spotfire.Dxp.Data.DataFunctions.Executors.SPlusFunctionExecutor.<ExecuteFunction>d__3.MoveNext()   at Spotfire.Dxp.Data.DataFunctions.DataFunctionExecutorService.<ExecuteFunction>d__6.MoveNext()"

Any help would be highly appriciated.

Login