Learn R Programming

PythonInR (version 0.1-12)

pyExecfile: Executes Python source file from within R

Description

The function pyExecfile calls the Python function execfile. which is the Python equivalent to the function source provided in R.

Usage

pyExecfile(filename)

Arguments

filename

a character string giving the name or full path of the file to be executed.

Details

The function execfile is kind of the source of Python. Since it got omitted in Python 3 a replacement gets assigned following common practices.

Examples

Run this code
# NOT RUN {
pyExecfile("myPythonScript.py")
# }

Run the code above in your browser using DataLab