ipython: Write a File of Python Commands to Test Package Modules in...

Description Usage Arguments

View source: R/pythonInterface.R

Description

A file of python commands will be written that set up an interactive Python session having imported the contents from a file (module) of python code in an R package. Typically, uploading such a file to ipython notebook allows the python code, along with additional or modified code, to be tested directly without interfacing from R.

Usage

1
2
ipython(file, package, module = "", ..., RPython = TRUE,
  folder = "python")

Arguments

file

A file name or open write connection. The python commands generated will be written to this file.

package

The R package containing the relevent module

module

The file (module) to be imported. Specifically, a command "from ... import *" will be generated. Omit this argument or supply it as "" to suppress this command, in which case explicit commands should be provided.

...

Additional python commands to be appended to the output file.

RPython

Should the path include the XRPython code, default TRUE, which is usually what you want.

folder

The name of the folder in the installed package; the default is the suggested "python"; that is, the installed version of folder "inst/python" in the source for the package. Note that it's the installed version; changes to the source code must be installed to show up in the output.


XRPython documentation built on May 2, 2019, 9:33 a.m.