Import installed python packages into the environment
import_py_pkgs(
py_pkgs = c("scipy", "pandas"),
envir = NULL,
path = get_py_path(),
delay_load = FALSE
)
vector of python packages to install
environment to load the main modules into
The path from which the module should be imported.
Logical (TRUE
/FALSE
). Delay loading the module until it
is first used? If FALSE, the module will be loaded immediately.
See reticulate::import()
for more information.
This function loops through py_pkgs
, and does the equivalent of the following,
and assigns it to the parent environment:
scipy <- reticulate::import("scipy")
or
scipy <- reticulate::import_from_path("scipy", path = "path/to/module")