Skip to main content

Python interface to the R language (embedded R)

Project description

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

Issues loading shared C libraries

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}

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.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rpy2-3.5.14.tar.gz (219.3 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

rpy2-3.5.14-cp311-cp311-macosx_10_9_universal2.whl (299.9 kB view details)

Uploaded CPython 3.11macOS 10.9+ universal2 (ARM64, x86-64)

rpy2-3.5.14-cp310-cp310-macosx_11_0_x86_64.whl (260.8 kB view details)

Uploaded CPython 3.10macOS 11.0+ x86-64

rpy2-3.5.14-cp39-cp39-macosx_11_0_x86_64.whl (260.8 kB view details)

Uploaded CPython 3.9macOS 11.0+ x86-64

rpy2-3.5.14-cp38-cp38-macosx_11_0_x86_64.whl (260.8 kB view details)

Uploaded CPython 3.8macOS 11.0+ x86-64

File details

Details for the file rpy2-3.5.14.tar.gz.

File metadata

  • Download URL: rpy2-3.5.14.tar.gz
  • Upload date:
  • Size: 219.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for rpy2-3.5.14.tar.gz
Algorithm Hash digest
SHA256 5f46ae31d36e117be366ad4ae02493c015ac6ba59ebe3b4cd7200075332fc481
MD5 80b9205ac3800fe1a092dd5f8a8ea299
BLAKE2b-256 30dcd9748ec2b61b6a1fcbaff3891961297c83cfa34c9f9984761fb6f6ae65d0

See more details on using hashes here.

File details

Details for the file rpy2-3.5.14-cp311-cp311-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for rpy2-3.5.14-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 f35910208e5945b5108b7668bcb58127742f47fc0e8df8b2f4889c86be6f6519
MD5 532610c6196b6214abc3490de28145f4
BLAKE2b-256 e109fe9825a32d0e5331b2bb6e211d140e19e266ccdbe7c4842bbb080c23d05e

See more details on using hashes here.

File details

Details for the file rpy2-3.5.14-cp310-cp310-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for rpy2-3.5.14-cp310-cp310-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 5cb7398adfcb6ca4faefbe856fb7af95eb11722ad18fbfcb4a79dbea1cf71c7c
MD5 f3b5c3f6b8ec2003c6dd857de2938e15
BLAKE2b-256 9b96db6ab1dab3c9c33bc1ee0d3d80a461ee2803c8672fe8244026558eb813a5

See more details on using hashes here.

File details

Details for the file rpy2-3.5.14-cp39-cp39-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for rpy2-3.5.14-cp39-cp39-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 ca95dee528d0a8032913de5fa85b8252b925f389aa2e2219d5314dcf43beeb1e
MD5 bec1e53d3e820021475650102162fe70
BLAKE2b-256 74d6fe2bd0e6a7bd40ad63ac8e4d26db6f53682a77c168d1f4b143bf7aaa1840

See more details on using hashes here.

File details

Details for the file rpy2-3.5.14-cp38-cp38-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for rpy2-3.5.14-cp38-cp38-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 adbd8e08f67f807fcca8e47473340e233a55c25fffd418081e6719316e03dbd7
MD5 375a4198fc544c62c4424e74bbc6fb84
BLAKE2b-256 e2b355615f8f89bfa0db5cac79dc2b032c15b30be8fc554c589b67bb898c613f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page