Description Usage Arguments Note See Also Examples
Run a SciDB query, optionally returning the result.
1 |
db |
a scidb database connection from |
query |
a single SciDB query string or scidb array object |
return |
if |
binary |
set to |
... |
additional options passed to |
When query is an arbitrary AFL query string and binary=TRUE,
optionally specify schema with a valid result array schema to skip
an extra metadata lookup query (see scidb).
Setting return=TRUE wrapes the AFL query expression with a SciDB
save operator, saving the data on the SciDB server in either binary or text
format depending on the value of the binary parameter. Please note that
some AFL expressions may not be "saved" using the AFL save operator, including
for instance the AFL create_array operator. Trying to return the result of such
a SciDB expression will result in a run-time error.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ## Not run:
db <- scidbconnect()
iquery(db, "build(<v:double>[i=1:5], sin(i))", return=TRUE)
## i v
## 1 0.8414710
## 2 0.9092974
## 3 0.1411200
## 4 -0.7568025
## 5 -0.9589243
# Use binary=FALSE and additional options to read.table function:
iquery(db, "build(<val:string>[i=1:3], '[(01),(02),(03)]', true)",xi
return=TRUE, binary=FALSE, colClasses=c("integer", "character"))
## i val
## 1 1 01
## 2 2 02
## 3 3 03
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.