Learn R Programming

scidb (version 3.0.0)

iquery: Run a SciDB query, optionally returning the result.

Description

Run a SciDB query, optionally returning the result.

Usage

iquery(db, query, return = FALSE, binary = TRUE, ...)

Arguments

db

a scidb database connection from scidbconnect

query

a single SciDB query string or scidb array object

return

if TRUE, return the result

binary

set to FALSE to read result from SciDB in text form

...

additional options passed to read.table when binary=FALSE, or optional result schema when binary=TRUE (see note below).

See Also

scidb as.R

Examples

Run this code
# 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
# }

Run the code above in your browser using DataLab