Factory function to open a SOMA measurement for reading (lifecycle: maturing).
Usage
SOMAMeasurementOpen(
  uri,
  mode = "READ",
  platform_config = NULL,
  tiledbsoma_ctx = NULL,
  tiledb_timestamp = NULL
)Arguments
- uri
 URI for the TileDB object.
- mode
 One of “
READ” or “WRITE”.- platform_config
 Optional platform configuration.
- tiledbsoma_ctx
 Optional SOMATileDBContext.
- tiledb_timestamp
 Optional Datetime (POSIXct) for TileDB timestamp; defaults to the current time. If not
NULL, all members accessed through the collection inherit the timestamp.
Value
A SOMA measurement stored at
uri opened in mode mode.
Examples
uri <- withr::local_tempfile(pattern = "soma-measurement")
var <- data.frame(
  soma_joinid = bit64::seq.integer64(0L, 99L),
  var_id = paste0("feature_", seq_len(100L))
)
sch <- arrow::infer_schema(var)
(ms <- SOMAMeasurementCreate(uri))
#> <SOMAMeasurement>
#>   uri: /tmp/RtmpzG0UPS/soma-measurement29d24c3a26e4
sdf <- ms$add_new_dataframe(
  "var",
  sch,
  "soma_joinid",
  list(soma_joinid = c(0, 100))
)
sdf$write(arrow::as_arrow_table(var, schema = sch))
sdf$close()
ms$close()
(ms <- SOMAMeasurementOpen(uri))
#> <SOMAMeasurement>
#>   uri: /tmp/RtmpzG0UPS/soma-measurement29d24c3a26e4
ms$var
#> <SOMADataFrame>
#>   uri: file:///tmp/RtmpzG0UPS/soma-measurement29d24c3a26e4/var
#>   dimensions: soma_joinid 
#>   attributes: var_id