Learn R Programming

PythonInR (version 0.1-12)

pyOptions: Options for the PythonInR package

Description

a function for getting and setting options in the PythonInR package.

Usage

pyOptions(option, value)

Arguments

option

a character giving the option to set or get.

value

the new value of the option.

Details

The following options are available:

  • numpyAlias a character giving the numpy alias, the default value is "numpy".

  • useNumpy a logical giving if numpy should be used if getting and setting matrices.

  • pandasAlias a character giving the pandas alias, the default value is "pandas".

  • usePandas a logical giving if pandas should be used if getting and setting data.frames.

  • winPython364 a logical indicating if Python 3 64-bit under windows is used, this option is set automatically at startup and shouldn't be changed.

Examples

Run this code
# NOT RUN {
pyOptions()
pyExec("import numpy as np")
pyOptions("numpyAlias", "np")
pyOptions("useNumpy", TRUE)
pyExec("import pandas as pd")
pyOptions("pandasAlias", "pd")
pyOptions("usePandas", TRUE)
# }

Run the code above in your browser using DataLab