set.seed(1)
# Generate sparse SciDB arrays
a <- as.scidb(Matrix::sparseMatrix(
sample(10,100,replace=TRUE),sample(10,100,replace=TRUE),x=runif(100)))
b <- as.scidb(Matrix::sparseMatrix(
sample(10,100,replace=TRUE),sample(10,100,replace=TRUE),x=runif(100)))
antijoin(a,b)[]
# Output looks like:
# [1,] 2 . . 1 2 1 . . . 2
# [2,] 2 . 2 2 2 1 1 1 2 2
# [3,] 2 . . 2 . 2 . . . 1
# [4,] . 2 1 . . . . 1 . 2
# [5,] . . . . . 1 . . . 2
# [6,] 1 2 . . 2 2 . 1 . 2
# [7,] . 1 . 1 . 1 . 1 . 1
# [8,] 2 . 1 . 1 1 1 . . .
# [9,] 2 . 1 . 2 . . 2 1 .
#[10,] 2 . . . 2 . 2 2 . .
Run the code above in your browser using DataLab