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)
module |
Module name |
as |
Alias for module name (affects names of R classes). Note that this is an advanced parameter that should generally only be used in package development (since it affects the S3 name of the imported class and can therefore interfere with S3 method dispatching). |
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)