pyOptions: Options for the PythonInR package

pyOptionsR Documentation

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

## 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)

Sage-Bionetworks/PythonEmbedInR documentation built on April 17, 2023, 4:23 p.m.