x <- as.big.matrix(matrix(sample(1:10, 200, replace=TRUE), 50, 4))
theorder <- order(x[,1])
for (i in 1:ncol(x)) x[,i] <- x[theorder,i]
thehash <- hash.mat(x, 1)
x[,]
thehash
# The following will produce all rows with entries 5 or 9 in the first column:
x[c(thehash[5,1]:thehash[5,2], thehash[9,1]:thehash[9,2]),]
Run the code above in your browser using DataLab