Options for the PythonInR package

Description

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

Usage

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## 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)

## End(Not run)