Description Usage Arguments Details Value Examples
Import the specified Python module for calling from R.
1 2 3 4 5 6 7 | 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) |
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
1 2 3 4 5 | ## Not run:
main <- import_main()
sys <- import("sys")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.