As.scidb: R array is an unsupported input array?


My issue seems similar to this other, much older topic:
After I try to create a scidb matrix with R using the as.scidb() function, I run into an error:

A <- as.scidb(matrix(1,100,100))
Error in scidbquery(query, afl) :
SystemException in file: src/query/ops/reshape/PhysicalReshape.cpp function: execute line: 127
Error description: Operator error. Operator reshape does not support the given virtual input array. Consider splitting the query and using store() to create a temporary result.
Failed query id: 1102772833543

I’m not sure why a 100x100 matrix filled with one’s is unacceptable to scidb. I can, as with the previous topic poster, run this:

A <- as.scidb(iris)

I noticed that iris is a vector. When I create other vectors, they do work:

A <- as.scidb(vector(length=20))

So it seems like as.scidb will accept single-dimension vectors, but not arrays. The research I am helping with requires transferring 2-dimensional matrices to and from SciDB. The installation of SciDB that I’m working with should be recent as of a few weeks ago, so I’m not sure why this might be an issue. Does anyone have any ideas?


HI, sorry for the latency.

I can’t replicate the error with:

A <- as.scidb(matrix(1,100,100))

Perhaps you’re on an old version of SciDB? This works OK with 12.12 and 14.3 at least.

As a work-around perhaps consider using the more efficient ‘build’ function, for example:

A <- build(1.0, dim=c(100,100), type=“double”)

(that approach builds the data on the SciDB side instead of in R and then uploading it to SciDB).

You can certainly transfer matrices between R and SciDB using ‘as.scidb’ – again, maybe you have too old a version of SciDB?