Objects from the Class
Objects can be created by calls of the form new("scidb", ...)
,
scidb("ARRAY_NAME", ...)
, or as.scidb(R_MATRIX, ...)
.Slots
name
:- Object of class
"character"
scidb array name. attributes
:- Object of class
"character"
Vector of SciDB attribute names. dimensions
:- Object of class
"character"
Vector of SciDB dimension names. schema
:- Object of class
"character"
SciDB array schema. logical_plan
:- Object of class
"character"
SciDB array plan. gc
:- Object of class
"environment"
An environment used to link the SciDB array to the R garbage collector. .S3Class
:- Object of class
"character"
~~
Methods
- %*%
signature(x = "scidb", y = "scidb")
: ... - %*%
signature(x = "scidb", y = "matrix")
: ... - %*%
signature(x = "matrix", y = "scidb")
: ... - %*%
signature(x = "scidb", y = "numeric")
: ... - %*%
signature(x = "numeric", y = "scidb")
: ... - %*%
signature(x = "scidb", y = "scidbdf")
: ... - crossprod
signature(x = "scidb", y = "scidb")
: ... - tcrossprod
signature(x = "scidb", y = "scidb")
: ... - crossprod
signature(x = "scidb", y = "missing")
: ... - tcrossprod
signature(x = "scidb", y = "missing")
: ... - is.scidb
signature(x = "ANY")
: ... - print
signature(x = "scidb")
: ... - head
signature(x = "scidb")
: ... - tail
signature(x = "scidb")
: ... - apply
signature(x = "scidb")
: ... - regrid
signature(x = "scidb")
: regrid(x, grid=c(m,...), expr="avg(attribute)")
Decimate the n-d SciDB array x
by binning its coordinate system according to the grid
argument and applying the aggregate expression on each bin. The grid
argument must be the same length as the dimension of the array x
. For example if x
is a 10x10 matrix, then regrid(x, c(2,1))
returns a 5x10 matrix replacing the rows with the average of values along every two rows.
- xgrid
signature(x = "scidb")
: xgrid(x, grid=c(m,...))
Prolong the coordinate system of the n-d SciDB array x
by replicating its values according to the grid
parameter. In some cases, xgrid
can be the inverse operation of regrid
. For example if x
is a 10x10 matrix, then xgrid(x, c(2,1))
returns a 20x10 matrix, replicating values twice along the row dimension.
- Filter
signature(f="character", x = "scidb")
: Filter(f,x)
'Filter' masks elements of a vector for which a predicate (logical) SciDB expression 'f' returns false by making them empty, returning a sparse version of the array.
- image
signature(x = "scidb")
: image(x, grid=c(m,n), op="sum(attribute)")
Display a heatmap-like image of the 2-d scidb array reference object x
.
grid(m,n)
specifies the repartitioned array block sizes and op
is a valid SciDB aggregation function applied to the repartitioned chunks. - diag
signature(x = "scidb")
: Return the diagonal of a SciDB matrix as a new 1d SciDB array (a vector). NOTE that the result vector is zero-indexed. - show
signature(object = "scidb")
: ... - t
signature(x = "scidb")
: t(x)
Return the transpose of the matrix x
.
- unpack
unpack(x = "scidb")
: unpack(x)
Return a 1-D representation of an array using the SciDB array unpack operator.
- diag
signature(x = "scidb")
: Return the diagonal of a SciDB matrix as a new 1d SciDB array (a vector). - sin
signature(x = "scidb")
: sin(x)
Return an array with the sine of each element of the array x
. The active attribute is used and should be numeric. The returned array contains a new attibute with "_sin" appended containing the result. Other trig functions (cos, tan, asin, acos, atan
) act similarly.
- abs
signature(x = "scidb")
: abs(x)
See doc. for sin
. - sqrt
signature(x = "scidb")
: sqrt(x)
See doc. for sin
. - exp
signature(x = "scidb")
: exp(x)
See doc. for sin
. - sin
signature(x = "scidb")
: sin(x)
See doc. for sin
. - cos
signature(x = "scidb")
: cos(x)
See doc. for sin
. - tan
signature(x = "scidb")
: tan(x)
See doc. for sin
. - asin
signature(x = "scidb")
: asin(x)
See doc. for sin
. - acos
signature(x = "scidb")
: acos(x)
See doc. for sin
. - atan
signature(x = "scidb")
: atan(x)
See doc. for sin
.
Notes
SciDB arrays are general n-dimensional sparse arrays with integer dimensions.
The scidb
class represents SciDB arrays in a way that mimics standard R
arrays in many ways. The scidbdf
class represents one-dimensional SciDB
arrays with one or more attributes that mimic R data frames. Matrix arithmetic operations are overloaded for 2-D numeric arrays.