Learn R Programming

scidb (version 1.1-2)

slice: Low-level SciDB slice operator

Description

Slice a SciDB array along a coordinate value returning a new SciDB array of lower dimension.

Usage

slice(x, d, n, `eval`=FALSE)

Arguments

x
A scidb object.
d
A character string representation of the coordinate axis to slice along, or logical or numeric index of the axis.
n
The value to slice on.
eval
(Optional) If true, execute the query and store the reult array. Otherwise defer evaluation.

Value

  • A new scidb object of lower dimension.

See Also

scidb

Examples

Run this code
# Build a 5x5 matrix:
x <- build("random()print(x[])

# Slice the 2nd row (i=1 since SciDB matrices start with zero index by default)
y <- slice(x, "i", 1)
print(y[])

Run the code above in your browser using DataLab