Okay I managed to figure it out. I need to specify a matrix as range. For instance if I want indexes 3 and 6 in my example, I would need to build a query matrix like this one: > query_mat query_mat [,1] [,2] [1,] 3 3 [2,] 6 6 Then, tmp = matrix_tdb[query_mat,] But using R for querying my tiledb is really much slower than when using python.