toInteger <- function(x, condition) { if (!is.integer(x)) tryCatch( {x = as.integer(x)[1]}, error = function(e) paste("cannot convert argument",substitute(x),"to integer") ) if (!condition(x)) stop(paste("argument",substitute(x),"does not verify condition",body(condition))) x } serialize = function(coeffs, file, append) { #......... #C function (from data.frame, type of IDs ??! force integers ? [yes]) #return raw vector #take raw vector, append it (binary mode) to a file #TODO: appendCoeffs() en C --> serialize et append to file } deserialize = function(file, range, serie_length) { #...... #C function (from file name) } getSeries(data, rank=NULL, id=NULL) { #TODO: } getCoeffs(.....) #FROM BINARY FILE !!! { }