+
+#NOTE: identifiers in first column
+getMedoids = function(path=".", xmlResult = "ppamResult.xml",
+ finalSeries = "ppamFinalSeries.bin")
+{
+ system(paste(path,"/ppam.exe deserialize ",finalSeries," ppamFinalSeries.csv -1",sep=""))
+ curves = read.table("ppamFinalSeries.csv", sep=",")
+ library(XML)
+ ranks = as.integer( xmlToList( xmlParse(xmlResult) )$ranks )
+ return ( curves[ranks,] ) # == medoids
+}