Learn R Programming

PythonInR (version 0.1-12)

pyFunction: creates a virtual Python function

Description

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

Usage

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

Run this code
# NOT RUN {
if ( pyIsConnected() ){
pySum <- pyFunction("sum")
pySum(1:3)
}
# }

Run the code above in your browser using DataLab