Skip to contents

Functional interface that initialises a TileDBArrayExp instance and opens an array object at READ or WRITE mode.

Usage

tdb_array(uri, mode = "READ", ctx = NULL, tiledb_timestamp = NULL)

Arguments

uri

URI path for the TileDB object.

mode

Mode to open : either "READ" (default) or "WRITE".

ctx

Optional tiledb::tiledb_ctx() object.

tiledb_timestamp

Set a TileDB timestamp range that the resource will be opened at. Effective only for "READ" mode. Valid options:

  • A NULL value (default)

  • An R object coercible to POSIXct with length 1 which used for end timestamp, or length 2 with start, end timestamps

  • An object of class tiledb_timestamp. See set_tiledb_timestamp()

Also, it can be set through active field $tiledb_timestamp.

Value

A TileDBArrayExp, R6 object.

Active bindings

  • ctx : A TileDB Context. See tiledb::tiledb_ctx()

  • tiledb_timestamp : A TileDB timestamp range that the resource will be opened at. See set_tiledb_timestamp()

  • uri : The URI of the TileDB object

  • mode: Get the mode of the object: one of the following: "CLOSED", "READ" or "WRITE"

  • object_type : The TileDB object type: "ARRAY","GROUP" or "INVALID"

  • object : Access the underlying tiledb::tiledb_array() object. When used before open() method, the underlying array will be initialised at "READ" mode and kept open

  • fragments_object : Access the TileDBFragments instance for this array

  • schema_version : Retrieve the schema version for this array

  • is_sparse : Check array schema for sparsity

  • size : Directory size

Examples

if (FALSE) { # \dontrun{
 uri <- tempdir()

 # create demo array on disk
 demo_array_UCBAdmissions(uri)

 arrobj <- tdb_array(uri)

 arrobj$object_type
 #> "ARRAY"

 arrobj$frag_num()
 #> 3

 arrobj$colnames()
 #> "Dept"   "Gender" "Admit"  "Freq"

 arrobj$has_enumeration()
 #> Admit  Freq
 #> TRUE FALSE
} # }