source_python: Read and evaluate a Python script

Description Usage Arguments Details

View source: R/source.R

Description

Evaluate a Python script within the Python main module, then make all public (non-module) objects within the main Python module available within the specified R environment.

Usage

1
source_python(file, envir = parent.frame(), convert = TRUE)

Arguments

file

Source file

envir

The environment to assign Python objects into (for example, parent.frame() or globalenv()). Specify NULL to not assign Python objects.

convert

TRUE to automatically convert Python objects to their R equivalent. If you pass FALSE you can do manual conversion using the py_to_r() function.

Details

To prevent assignment of objects into R, pass NULL for the envir parameter.


Mormukut11/R-interface-to-Python documentation built on May 21, 2019, 9:36 a.m.