Inserting a binary blob to SciDB from the R package


#1

Do we have an example of inserting a binary blob from the R package?


#2

Here is an example (note the special indexing after download from SciDB):

genexp_mat = matrix(runif(3*4),  3)
print(dim(genexp_mat))
# [1] 3 4
x =serialize(genexp_mat, NULL)
library(scidb); scidbconnect()
xx = as.scidb(x)
# SciDB expression  R_arraye83d2464ea9b1480256928078527...
# SciDB schema  <val:binary> [i=0:0,1,0]
# variable dimension   type nullable start end chunk
# 1        i      TRUE  int64    FALSE     0   0     1
# 2      val     FALSE binary     TRUE

identical(x, xx[][[2]][[1]])