+#' \dontrun{
+#' # WER distances computations are too long for CRAN (for now)
+#' # Note: on this small example, sequential run is faster
+#'
+#' # Random series around cos(x,2x,3x)/sin(x,2x,3x)
+#' x <- seq(0,50,0.05)
+#' L <- length(x) #1001
+#' ref_series <- matrix( c(cos(x),cos(2*x),cos(3*x),sin(x),sin(2*x),sin(3*x)), ncol=6 )
+#' library(wmtsa)
+#' series <- do.call( cbind, lapply( 1:6, function(i)
+#' do.call(cbind, wmtsa::wavBootstrap(ref_series[,i], n.realization=40)) ) )
+#' # Mix series so that all groups are evenly spread
+#' permut <- (0:239)%%6 * 40 + (0:239)%/%6 + 1
+#' series = series[,permut]
+#' #dim(series) #c(240,1001)
+#' res_ascii <- claws(series, K1=30, K2=6, nb_series_per_chunk=500,
+#' nb_items_clust=100, random=FALSE, verbose=TRUE, ncores_clust=1)
+#'
+#' # Same example, from CSV file
+#' csv_file <- tempfile(pattern="epclust_series.csv_")
+#' write.table(t(series), csv_file, sep=",", row.names=FALSE, col.names=FALSE)
+#' res_csv <- claws(csv_file, 30, 6, 500, 100, random=FALSE, ncores_clust=1)
+#'
+#' # Same example, from binary file
+#' bin_file <- tempfile(pattern="epclust_series.bin_")
+#' nbytes <- 8
+#' endian <- "little"
+#' binarize(csv_file, bin_file, 500, ",", nbytes, endian)
+#' getSeries <- function(indices) getDataInFile(indices, bin_file, nbytes, endian)
+#' res_bin <- claws(getSeries, 30, 6, 500, 100, random=FALSE, ncores_clust=1)
+#' unlink(csv_file)
+#' unlink(bin_file)
+#'
+#' # Same example, from SQLite database
+#' library(DBI)
+#' series_db <- dbConnect(RSQLite::SQLite(), "file::memory:")
+#' # Prepare data.frame in DB-format
+#' n <- ncol(series)
+#' times_values <- data.frame(
+#' id = rep(1:n,each=L),
+#' time = rep( as.POSIXct(1800*(1:L),"GMT",origin="2001-01-01"), n ),
+#' value = as.double(series) )
+#' dbWriteTable(series_db, "times_values", times_values)
+#' # Fill associative array, map index to identifier
+#' indexToID_inDB <- as.character(
+#' dbGetQuery(series_db, 'SELECT DISTINCT id FROM times_values')[,"id"] )
+#' serie_length <- as.integer( dbGetQuery(series_db,
+#' paste("SELECT COUNT(*) FROM times_values WHERE id == ",indexToID_inDB[1],sep="")) )
+#' getSeries <- function(indices) {
+#' indices = indices[ indices <= length(indexToID_inDB) ]
+#' if (length(indices) == 0)
+#' return (NULL)
+#' request <- "SELECT id,value FROM times_values WHERE id in ("
+#' for (i in seq_along(indices)) {
+#' request <- paste(request, indexToID_inDB[ indices[i] ], sep="")
+#' if (i < length(indices))
+#' request <- paste(request, ",", sep="")
+#' }
+#' request <- paste(request, ")", sep="")
+#' df_series <- dbGetQuery(series_db, request)
+#' matrix(df_series[,"value"], nrow=serie_length)
+#' }
+#' res_db <- claws(getSeries, 30, 6, 500, 100, random=FALSE, ncores_clust=1)
+#' dbDisconnect(series_db)
+#'
+#' # All results should be equal:
+#' all(res_ascii$ranks == res_csv$ranks
+#' & res_ascii$ranks == res_bin$ranks
+#' & res_ascii$ranks == res_db$ranks)