import {reticulate} | R Documentation |
Import the specified Python module for calling from R.
import(module, as = NULL, convert = TRUE, delay_load = FALSE) import_main(convert = TRUE) import_builtins(convert = TRUE) import_from_path(module, path, convert = TRUE, delay_load = FALSE)
module |
Module name |
as |
Alias for module name (affects names of R classes) |
convert |
|
delay_load |
|
path |
Path to import from |
The import_from_path
function imports a Python module from an
arbitrary filesystem path (the directory of the specified python script is
automatically added to the sys.path
).
A Python module
## Not run: main <- import_main() sys <- import("sys") ## End(Not run)