Skip to contents

Initialise a new LaminDB instance

Usage

lamin_init(storage, name = NULL, db = NULL, modules = NULL)

lamin_init_temp(
  name = "laminr-temp",
  db = NULL,
  modules = NULL,
  add_timestamp = TRUE,
  envir = parent.frame()
)

Arguments

storage

A local directory, AWS S3 bucket or Google Cloud Storage bucket

name

A name for the instance

db

A Postgres database connection URL, use NULL for SQLite.

modules

A vector of modules to include (e.g. "bionty")

add_timestamp

Whether to append a timestamp to name to make it unique

envir

An environment passed to withr::defer()

Details

For lamin_init_temp(), a time stamp is appended to name (if add_timestamp = TRUE) and then a new instance is initialised with lamin_init() using a temporary directory. A lamin_delete() call is registered as an exit handler with withr::defer() to clean up the instance when envir finishes.

The lamin_init_temp() function is mostly for internal use and in most cases users will want lamin_init().

Examples

if (FALSE) { # \dontrun{
lamin_init("mydata", modules = c("bionty", "wetlab"))
} # }