Description Usage Arguments Value Note See Also Examples
Download SciDB data to R
1 |
x |
a |
only_attributes |
optional logical argument, if |
binary |
optional logical value, set to |
An R data.frame
This convenience function is equivalent to running iquery(db, x, return=TRUE)
for
a SciDB connection object db
.
The only_attributes=TRUE
option only works with binary transfers, and if specified will set binary=TRUE
.
Beware of the only_attributes=TRUE
setting–SciDB may return data in arbitrary order.
SciDB values are always returned as R data frames. SciDB scalar types are converted to corresponding R types as follows:
double -> double
int64 -> integer64
uint64 -> double
uint32 -> double
int32 -> integer
int16 -> integer
unit16 -> integer
int8 -> integer
uint8 -> integer
bool -> logical
string -> character
char -> character
binary -> raw
datetime -> Date
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | ## Not run:
db <- scidbconnect()
x <- scidb(db, "build(<v:double>[i=1:5], sin(i))")
as.R(x)
## i v
## 1 0.8414710
## 2 0.9092974
## 3 0.1411200
## 4 -0.7568025
## 5 -0.9589243
as.R(x, only_attributes=TRUE)
## v
## 0.8414710
## 0.9092974
## 0.1411200
## -0.7568025
## -0.9589243
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.