Learn R Programming

tiledb (version 0.33.0)

.core_info: libtiledb Information

Description

Get version and install information of the core libtiledb install

Usage

.core_info()

.core_hash()

Arguments

Value

.core_info(): A named character vector with the following entries:

  • version”: libtiledb version

  • libtype”: type of libtiledb install; will be one of “vendored”, “system”, or “unknown

.core_hash(): The MD5 hash of the core info

Checking the <code>libtiledb</code> information in downstream packages

These functions are designed to make it easy to test if the core libtiledb install has changed. This is accomplished by adding a build-time constant to cache the version of libtiledb was built with. For example, in zzz.R, put the following line to cache the libtiledb information during package build


.built_with <- list(libtiledb = tiledb::.core_hash())

Then, in the load hook, add the following check


.onLoad <- function(libname, pkgname) {
  if (.built_with$libtiledb != tiledb::.core_hash()) {
    warning("Core libtiledb has changed, please reinstall ", pkgname)
  }
}

This will throw a warning if tiledb, and therefore libtiledb, has changed between downstream package install and load

Examples

Run this code
.core_info()

.core_hash()

Run the code above in your browser using DataLab