Learn R Programming

scidb (version 1.0-1)

df2scidb: Copy a data frame into a SciDB array.

Description

Copy a data frame into a new 1-D SciDB array.

Usage

df2scidb(X, name = ifelse(exists(as.character(match.call()[2])), as.character(match.call()[2]), "X"), dimlabel = "row", chunkSize, rowOverlap = 0L, types = NULL, nullable = FALSE, real_format = "%.15f", gc)

Arguments

X
A data frame.
name
The SciDB array name, defaults to the R variable name if available.
dimlabel
Name the SciDB dimension.
chunkSize
The SciDB chunk size.
rowOverlap
The SciDB chunk overlap.
types
An optional vector explicitly specifying the SciDB attribute types. Length must match the number of columns of the data frame.
nullable
An optional vector indicating the SciDB nullable property of each attribute. Length must match the number of columns of the data frame.
real_format
The format string used to print real values.
gc
Optional logical value. If TRUE, then resulting SciDB array will be garbage-collected when the R variable referencing it is. The default value is FALSE.

Value

  • NULL is invisibly returned. SciDB errors are propagated as R error conditions.

Details

df2scidb is a workhorse utility function that transfers an R data frame into a 1-D SciDB array via intermediate CSV formatting. The columns of the data frame correspond to attributes in the SciDB array. The iquery function returns query results using a similar method as R data frames.

Examples

Run this code
df2scidb(iris)
scidblist()
head(iquery("scan(iris)", return=TRUE))

Run the code above in your browser using DataLab