pyFunction: creates a virtual Python function

View source: R/PyObject.R

pyFunctionR Documentation

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


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

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