Skip to main content

Python -> R bridge

pypi Codecov GH Actions

The project's webpage is here: https://rpy2.github.io/

Installation

pip should work out of the box:

pip install rpy2

The package has optional depencies providing specific functionalities not otherwise required to use the rest of rpy2.

For example, to be able to run the unit tests:

pip install rpy2[test]

To install all optional dependencies (numpy, pandas, ipython), use:

pip install rpy2[all]

The package is known to compile on Linux, MacOSX (provided that developper tools are installed, and you are ready figure out how by yourself). The situation is currently a little more complicated on Windows. Check the issue tracker.

In case you find yourself with this source without any idea of what it takes to compile anything on your platform, try first

python setup.py install

Non system-R installations

Whenever R is in not installed in a system location, the system might not know where to find the R shared library.

If R is in the PATH, that is entering R on the command line successfully starts an R terminal, but rpy2 does not work because of missing C libraries, try the following before starting Python:

export LD_LIBRARY_PATH="$(python -m rpy2.situation LD_LIBRARY_PATH)":${LD_LIBRARY_PATH}

Docker

To try rpy2 in an ipython console:

docker run --rm -p 8888:8888 rpy2/jupyter-ubuntu:master-20.04 ipython

To run a jupypter notebook on port 8888:

docker run --rm -p 8888:8888 rpy2/jupyter-ubuntu:master-20.04

More information about Docker images can be found in the docker image repository.

Images with jupyter are can be used with mybinder.

Documentation

Documentation is available either in the source tree (doc/), or online.

Testing

rpy2 uses pytest, with the plugin pytest-cov for code coverage. To test the package from the source tree, either to check and installation on your system or before submitting a pull request, do:

pytest tests/

For code coverage, do:

pytest --cov=rpy2.rinterface_lib \
       --cov=rpy2.rinterface \
       --cov=rpy2.ipython \
       --cov=rpy2.robject \
       tests

For more options, such as how to run specify tests, please refer to the pytest documentation.

License

RPy2 can be used under the terms of the GNU General Public License Version 2 or later (see the file gpl-2.0.txt). This is the very same license R itself is released under.

Metadata

Release files for rpy2 3.5.10

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rpy2 3.5.10
File Size Uploaded Provenance Actions
rpy2-3.5.10.tar.gz 215.9 kB Without provenance Details for rpy2-3.5.10.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for rpy2 3.5.10
File Interpreter ABI Platform Actions
rpy2-3.5.10-cp38-cp38-macosx_10_15_x86_64.whl CPython 3.8 CPython 3.8 macOS 10.15+ x86-64 Details for rpy2-3.5.10-cp38-cp38-macosx_10_15_x86_64.whl
rpy2-3.5.10-cp37-cp37m-macosx_10_15_x86_64.whl CPython 3.7 CPython 3.7 pymalloc macOS 10.15+ x86-64 Details for rpy2-3.5.10-cp37-cp37m-macosx_10_15_x86_64.whl

Total release size: 731.2 kB

Release files / rpy2-3.5.10.tar.gz

Download URL rpy2-3.5.10.tar.gz
Size 215.9 kB
Tags Source
SHA-256 checksum
How to use checksums
f81f0afb01e3c6f515c09573bc585c0e1c7e385ec81415ce0a62268c605ec7fc
BLAKE2b-256 checksum
How to use checksums
fe1c18c718a1365bedc10438810637b5d735737c697998d5c163cc58edb6f1ee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.28.2 setuptools/61.3.1 requests-toolbelt/0.9.1 tqdm/4.64.1 CPython/3.8.10

Release files / rpy2-3.5.10-cp38-cp38-macosx_10_15_x86_64.whl

Download URL rpy2-3.5.10-cp38-cp38-macosx_10_15_x86_64.whl
Size 257.6 kB
Tags CPython 3.8 macOS 10.15+ x86-64
SHA-256 checksum
How to use checksums
798350c4faaebaccacf92c1c7e3619aa049e9bdaf3265822eefdeae1f3d7becb
BLAKE2b-256 checksum
How to use checksums
338947d303046e48053fcedabd6e14b4a7285a463b312ebbe82d73a2bf729636
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.28.2 setuptools/61.3.1 requests-toolbelt/0.9.1 tqdm/4.64.1 CPython/3.8.10

Release files / rpy2-3.5.10-cp37-cp37m-macosx_10_15_x86_64.whl

Download URL rpy2-3.5.10-cp37-cp37m-macosx_10_15_x86_64.whl
Size 257.6 kB
Tags CPython 3.7 CPython 3.7 pymalloc macOS 10.15+ x86-64
SHA-256 checksum
How to use checksums
a524d09a85ffda275985919bf1e1f850e83036fbadda5fd0c46959b486c21841
BLAKE2b-256 checksum
How to use checksums
7b125d3768186097292461cc2e76cd731f7eee447610d71c653bccff5cf4aea9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.28.2 setuptools/61.3.1 requests-toolbelt/0.9.1 tqdm/4.64.1 CPython/3.8.10

Security for rpy2 3.5.10

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

3.5.10 This release

3 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page