x <- as.scidb(iris)
y <- unique(x$Species)
persist(y)
save(y, file="y.rdata")
# Now, *both* x and y can be removed without deleting the backing SciDB
# array. Without persist or setting gc=FALSE on x, the array would have
# been removed.
rm(x,y)
gc()
# Since the array is still there, we can get it back.
load("y.rdata")
y[]
Run the code above in your browser using DataLab