Skip to contents

Virtual base class to add ND-array-specific functionality to the SOMAArrayBase class (lifecycle: maturing).

See also

Super classes

tiledbsoma::SOMAObject -> tiledbsoma::SOMAArrayBase -> SOMANDArrayBase

Methods

Inherited methods


Method create()

Create a SOMA NDArray named with the URI (lifecycle: maturing).

Note: $create() is considered internal and should not be called directly; use factory functions (eg. SOMASparseNDArrayCreate()) instead.

Usage

SOMANDArrayBase$create(type, shape, platform_config = NULL)

Arguments

type

An Arrow type defining the type of each element in the array.

shape

a vector of integers defining the shape of the array.

platform_config

A platform configuration object

Returns

Returns self.


Method set_data_type()

Sets a cache value for the datatype (lifecycle: maturing).

Usage

SOMANDArrayBase$set_data_type(type)

Arguments

type

A character value describing the TileDB data type.


Method tiledbsoma_has_upgraded_shape()

Test if the array has the upgraded resizeable shape feature from TileDB-SOMA 1.15, the array was created with this support, or it has had $upgrade_domain() applied to it (lifecycle: maturing).

Usage

SOMANDArrayBase$tiledbsoma_has_upgraded_shape()

Returns

Returns TRUE if the array has the upgraded resizable shape feature; otherwise, returns FALSE.


Method resize()

Increases the shape of the array as specified, up to the hard limit which is maxshape. Raises an error if the new shape is less than the current shape or exceeds maxshape in any dimension. Also raises an error if the array doesn't already have a shape; in that case please call $tiledbsoma_upgrade_shape() (lifecycle: maturing).

Usage

SOMANDArrayBase$resize(new_shape, check_only = FALSE)

Arguments

new_shape

An integerish vector of the same length as the array's $ndim().

check_only

If true, does not apply the operation, but only reports whether it would have succeeded.

Returns

If check_only, returns the empty string if no error is detected, else a description of the error. Otherwise, invisibly returns NULL.


Method tiledbsoma_upgrade_shape()

Allows the array to have a resizeable shape as described in the TileDB-SOMA 1.15 release notes. Raises an error if the shape exceeds maxshape in any dimension, or if the array already has a shape. The methods $tiledbsoma_upgrade_shape() and $resize() are very similar: the former must be called on a pre-1.15 array the first time a shape is set on it; the latter must be used for subsequent resizes on any array which already has upgraded shape (lifecycle: maturing).

Usage

SOMANDArrayBase$tiledbsoma_upgrade_shape(shape, check_only = FALSE)

Arguments

shape

An integerish vector of the same length as the array's $ndim().

check_only

If true, does not apply the operation, but only reports whether it would have succeeded.

Returns

If check_only, returns the empty string if no error is detected, else a description of the error. Otherwise, invisibly returns NULL.


Method clone()

The objects of this class are cloneable with this method.

Usage

SOMANDArrayBase$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.