py_get_item: Get an item from a Python object

Description Usage Arguments See Also

View source: R/python.R

Description

Retrieve an item from a Python object, similar to how x[name] might be used in Python code to access an item indexed by key on an object x. The object's __getitem__ method will be called.

Usage

1
py_get_item(x, key, silent = FALSE)

Arguments

x

A Python object.

key

The key used for item lookup.

silent

Boolean; when TRUE, attempts to access missing items will return NULL rather than throw an error.

See Also

Other item-related APIs: py_del_item, py_set_item


Mormukut11/R-interface-to-Python documentation built on May 21, 2019, 9:36 a.m.