| import_module | R Documentation |
This function can be used to import LaminDB Python modules with additional checks and nicer error messages.
import_module(module, ...)
module |
The name of the Python module to import |
... |
Arguments passed on to
|
Python dependencies are set using require_module() before importing
the module and used to create an ephemeral environment unless another
environment is found (see vignette("versions", package = "reticulate")).
Requirements for the lamindb module can be controlled using environment
variables differently, see https://docs.lamin.ai/setup-laminr for details.
An object representing a Python package
require_module() and reticulate::py_require() for defining Python
dependencies
vignette("versions", package = "reticulate") for setting the Python
environment to use (or online here)
## Not run:
# Import lamindb to start interacting with an instance
ln <- import_module("lamindb")
# Import lamindb with optional dependencies
ln <- import_module("lamindb", options = c("dev"))
# Import other LaminDB modules
bt <- import_module("bionty")
pt <- import_module("pertdb")
cc <- import_module("clinicore")
# Import any Python module
np <- import_module("numpy")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.