Learn R Programming

scidb (version 1.2-0)

reshape-methods: Methods for Function reshape in Package scidb

Description

Change the dimensionality of a SciDB array object.

Usage

"reshape"(data, schema, shape, dimnames, start, chunks, `eval`=FALSE)

Arguments

data
A scidb array object.
schema
Optional character-valued schema.
shape
An integer vector of new dimension sizes.
dimnames
An optional integer vector of new dimension names.
start
An optional integer vector of new dimension starting coordinates.
chunks
An optional integer vector of new dimension chunk sizes.
eval
(Optional) If true, execute the query and store the reult array. Otherwise defer evaluation.

Value

scidb reference object.

Details

If schema is specified the other shape arguments are ignored.

The product of the entries of the shape vector must match the product of the dimensions of data.

The optional dimnames, start and chunks arguments must match the length of shape if they are supplied.

If not specified in either schema or start, the output array will start at the origin.

Examples

Run this code
## Not run: 
# # Create a 5 x 4 matrix
# X <- as.scidb(matrix(rnorm(20),5))
# 
# # Reshape into a 3-dimensional 2x2x5 array
# Y <- reshape(X, c(2,2,5))
# ## End(Not run)

Run the code above in your browser using DataLab