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.13.tar.gz (218.8 kB view details)

Uploaded Source

Built Distributions

rpy2-3.5.13-cp311-cp311-macosx_10_9_universal2.whl (299.7 kB view details)

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

rpy2-3.5.13-cp310-cp310-macosx_11_0_x86_64.whl (260.6 kB view details)

Uploaded CPython 3.10macOS 11.0+ x86-64

rpy2-3.5.13-cp39-cp39-macosx_11_0_x86_64.whl (260.7 kB view details)

Uploaded CPython 3.9macOS 11.0+ x86-64

rpy2-3.5.13-cp38-cp38-macosx_11_0_x86_64.whl (260.6 kB view details)

Uploaded CPython 3.8macOS 11.0+ x86-64

rpy2-3.5.13-cp37-cp37m-macosx_11_0_x86_64.whl (260.7 kB view details)

Uploaded CPython 3.7mmacOS 11.0+ x86-64

File details

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

File metadata

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

File hashes

Hashes for rpy2-3.5.13.tar.gz
Algorithm Hash digest
SHA256 41d037599f54336f54e754d82853fae06be9438d9fb3b514d90da74eaf328ddd
MD5 9d086d3fbbbd4676abfa68b2cda8fdb9
BLAKE2b-256 5543d11bbc1e87383e8a01d74022182bc292011760a2f23c449d2c04dc1b794e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rpy2-3.5.13-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 488f2ad3220275b7717073d561b22ebf29e4be4d26aed7f45e49b453ff08a640
MD5 dfb0a424912cd53cba372d5ae4accb2f
BLAKE2b-256 a45b5cf993ff985b47fbe15ed923a4b90790467f8f3b4d2dfb3a3bc18f4d71c1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rpy2-3.5.13-cp310-cp310-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 1748f56343be608558f2f40b43c2e8a9103af91e721b7f9617f10c86cc284dde
MD5 f4ab32790266445c9947bd52d93a3d81
BLAKE2b-256 05b4bc7da4d442bad58c94e4da260ee9cbed11f3d5bf43e588f149720235bc94

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rpy2-3.5.13-cp39-cp39-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 11f9d68ed416f7802c7673f25796e49e9717a9e05f950277b90ad1e50fd95e42
MD5 d0ce82a48487a4565f8dcc9df93a6c23
BLAKE2b-256 63ecdd49e62b167a00dff0e39e771cbc40aa95673f4ca6aaf56bde3f7039f3af

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rpy2-3.5.13-cp38-cp38-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 f2eaf6910cf96cc812a34501f45d485ef8d1c36ed1a83955aa6691ea38a85216
MD5 eca824713970190ed1c62e7c75589203
BLAKE2b-256 a3d04a95cf5077d2ede7122ee853be796364f51a5cf168e4859525ca8fdd591e

See more details on using hashes here.

File details

Details for the file rpy2-3.5.13-cp37-cp37m-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for rpy2-3.5.13-cp37-cp37m-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 5353f3ada4cb01245fbec03fdec326e68f32f032b19836154d95c56c7568fd50
MD5 b8563f6c10c484df54eeb39539cd9c51
BLAKE2b-256 a7901a7e8992402dfb9efab37164fd55fc90226d43b70cbe41387f158ce66682

See more details on using hashes here.

Supported by

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