# NOT RUN {
# Note: all the available CPU cores might be used
set.seed(seed = 1)
rows <- 100
cols <- 1000
vals <- sample(1 : (rows * cols / 2), rows * cols, replace = TRUE)
m <- matrix(vals, nrow = rows, ncol = cols)
m[sample(1 : (rows * cols), rows * cols / 1000)] <- NA
r <- tgs_knn(m, 3)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab