Python interface to the R language (embedded R)
Project description
Python -> R bridge
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
Built Distributions
File details
Details for the file rpy2-3.5.16.tar.gz
.
File metadata
- Download URL: rpy2-3.5.16.tar.gz
- Upload date:
- Size: 220.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 837e2f74583658a5c4c339761a73f9434f33ef9ced3e30c64da7562165c2801b |
|
MD5 | be5385a5547673f5b1b64e245dcd7f13 |
|
BLAKE2b-256 | 204a2c7a3e08c4db3eb6c5fd050815b11947073997d0a521cd83c7dec1946d2e |
File details
Details for the file rpy2-3.5.16-cp311-cp311-macosx_10_9_universal2.whl
.
File metadata
- Download URL: rpy2-3.5.16-cp311-cp311-macosx_10_9_universal2.whl
- Upload date:
- Size: 299.9 kB
- Tags: CPython 3.11, macOS 10.9+ universal2 (ARM64, x86-64)
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f076b34bd79f62ae583e75acc1b305ba73a6639ea5c9a44dc53896709ccd8ba0 |
|
MD5 | 21d124a6484c7e548624ca9de5c0ed95 |
|
BLAKE2b-256 | 16211802c3e09cf3bcc850d5c439a21aa2b5a004ba3d6f61789d42db6de05364 |
File details
Details for the file rpy2-3.5.16-cp310-cp310-macosx_11_0_x86_64.whl
.
File metadata
- Download URL: rpy2-3.5.16-cp310-cp310-macosx_11_0_x86_64.whl
- Upload date:
- Size: 260.8 kB
- Tags: CPython 3.10, macOS 11.0+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c748fc74ba01a51f6aca0a5f9e7bf637cd09413ffa031dd79b49b7a9fe97770b |
|
MD5 | 9c92529ee79c10258dbf705a83bab5de |
|
BLAKE2b-256 | dfc8b5c570ae8804b02bd771490ab62566ad41662e17134ebb9d13a36aa880a4 |
File details
Details for the file rpy2-3.5.16-cp39-cp39-macosx_11_0_x86_64.whl
.
File metadata
- Download URL: rpy2-3.5.16-cp39-cp39-macosx_11_0_x86_64.whl
- Upload date:
- Size: 260.8 kB
- Tags: CPython 3.9, macOS 11.0+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c067769dbade7faccdc8d2181ae5e29329fe0e66289fb291436a546da2f5e881 |
|
MD5 | ff7f666abd2a1d473f718362234a9b76 |
|
BLAKE2b-256 | 1e3017eb8f6dcc41f974f4e072d3d3537229384e4f987822bb3d90ba0f77e857 |
File details
Details for the file rpy2-3.5.16-cp38-cp38-macosx_11_0_x86_64.whl
.
File metadata
- Download URL: rpy2-3.5.16-cp38-cp38-macosx_11_0_x86_64.whl
- Upload date:
- Size: 260.8 kB
- Tags: CPython 3.8, macOS 11.0+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3bb396851710856c6544c4278988b2abfe01d5a392278e5157b97148e62079c4 |
|
MD5 | 8f291cbae919158935349b058833400d |
|
BLAKE2b-256 | 0d6483aac910b8fadd66365582c7dc0c065315dbeafe9b8cf3e53aa3b189277a |