// Script to get R - output
evalValue = evalScript(rConnection, name, showWarnings);
// System.out.println(evalValue);
if (evalValue.isVector()){
if (evalValue instanceof REXPString)
kClusteringResult[i] = new RResult(name, evalValue.asStrings());
else if (evalValue instanceof REXPInteger)
kClusteringResult[i] = new RResult(name, evalValue.asIntegers());
else if (evalValue instanceof REXPDouble){
if (evalValue.dim() == null)
kClusteringResult[i] = new RResult(name, evalValue.asDoubles());
else
kClusteringResult[i] = new RResult(name, evalValue.asDoubleMatrix());
}
else{
// if no previous cases were true, return debug String
kClusteringResult[i] = new RResult(name, evalValue.toDebugString());
}
}
else{
kClusteringResult[i] = new RResult(name, evalValue.toDebugString());
}
}
}
catch (Exception e)
{