pyFunction: creates a virtual Python function

Description Usage Arguments Details Examples

View source: R/PyObject.R

Description

The function pyFunction creates a new object of type pyFunction based on a given key.

Usage

1
pyFunction(key, regFinalizer = FALSE)

Arguments

key

a string specifying the name of a Python method/function.

regFinalizer

a logical indicating if a finalizer should be be registered, the default value is FALSE.

Details

The function pyFunction makes it easy to create interfaces to Python functions.

Examples

1
2
3
4
if ( pyIsConnected() ){
pySum <- pyFunction("sum")
pySum(1:3)
}

PythonInR documentation built on July 1, 2020, 6:05 p.m.