1 #R-equivalent of computeMedoidsIndices, requiring a matrix
2 #(thus potentially breaking "fit-in-memory" hope)
3 R_computeMedoidsIndices <- function(medoids, series)
5 nb_series = ncol(series)
8 mi[i] <- which.min( colSums( sweep(medoids, 1, series[,i], '-')^2 ) )