Mapping R API to Python
Project description
Interoperate R with Python
Installation
# install released version
pip install -U rchitect
# or the development version
pip install -U git+https://github.com/randy3k/rchitect
Why reinvent the wheel?
You may be curious why I reinvented the wheel when there is rpy2
?
The main reason is to drive radian
.
rpy2
was not suitable because it is missing some key features for running
the R REPL. Speaking of compatibility, rchitect
has been thoroughly tested on
multiple platforms such as Windows, macOS and Linux and we also provide binary
wheels for user convenience.
Getting started
from rchitect import *
a = reval("1:5") # evaluate an R expression in the global environment
b = rcopy(a) # convert any RObject returned by `reval` to its python type
c = robject(b) # convert any python object to its R type
d = rcall("sum", c) # call an R function. Python objects are converted to RObjects implicitly.
FAQ
If rchitect
fails to open the R shared library, user should first
try to expose the path to R to the PATH
vaiable.
In Linux/macOS, you could also export the environment variable R_HOME
. For example,
$ export R_HOME=/usr/local/lib/R
$ radian
Sometimes, you may also need to futher specify LD_LIBRARY_PATH
if R fails to find some shared libraries,
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:`R RHOME`/lib"
Please also make sure that R was installed with the R shared library libR.so
or libR.dylib
or libR.dll
. On Linux, the flag --enable-R-shlib
may be needed to install R from the source.
Wiki
reticulate conversions
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
Hashes for rchitect-0.3.13-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3dfbb8067541596ebb64256011de4e3dac6accee7b4194a56606a2a59f5c6bdf |
|
MD5 | d02a2e2fbea65606d6cb8caa5c09c0d1 |
|
BLAKE2b-256 | 772ef50086bd0b49d8bf7fd1d78b55aba450e6e081616939184899b70666b215 |
Hashes for rchitect-0.3.13-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8048a9667d2d74c642f298ff91bdcbf2aa3ff3bb02fc36e3cc1853873d0b151e |
|
MD5 | 2e2af380f7861fea5d620ffc0ab627c7 |
|
BLAKE2b-256 | b18e13df7b84365aaa1df6df903dc3c6e5ee4632f5228cb87db2dcc2295fc04e |
Hashes for rchitect-0.3.13-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e1c2fa5e9fdfa9da504a9143e2aab610fc5eb21aaec86dc2572c97901b518ad8 |
|
MD5 | 67f72155d5b50d28e765b4281d0891cd |
|
BLAKE2b-256 | 00876fbd5331493f87e5177ed566aa6d150c3bce9f5cd0216d17bd4b2cc2fb1e |
Hashes for rchitect-0.3.13-cp37-cp37m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 447213160aa1e3cf9f656f2037bf20c6473d21bcd6f1f58a3d4df013c81f7f96 |
|
MD5 | 731ac18d687b6f37463317019ce0d5e2 |
|
BLAKE2b-256 | f872b17a1e73bc55e4f614ae0d012961fc93ffb5f2be8cb1d0b3bdbc26e11799 |
Hashes for rchitect-0.3.13-cp37-cp37m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b442a78cb47d7e63d91e09399124ef503bf3fe3739113b81561bdaf8c06f66ed |
|
MD5 | b0698b4a01f4bc45efaa016f7116eb64 |
|
BLAKE2b-256 | 20b5e7d0595b61cd47854ba6451cfa0ac3c708da2a3795d374b4b9ea96d6ad0e |
Hashes for rchitect-0.3.13-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c21a42ec9f0e799535875743dbe3962cc24d1f078a645651748f8eaafd22afa1 |
|
MD5 | 491c2e8b9b79033094783e2d219deb41 |
|
BLAKE2b-256 | af4928620455766d444b9825041aa8b645c6219a4f05824d80e8a3cb7ec88be9 |
Hashes for rchitect-0.3.13-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a9cc83e7eb8ad19c8ed8742beda18d2fd85e8d73612386230d28396cf870290 |
|
MD5 | c89a948edb2e542d9756536eda088cc0 |
|
BLAKE2b-256 | 55bc15fc700f062ab099b01407d89c7f257da062ca477b09f88c96ce6243efd0 |
Hashes for rchitect-0.3.13-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e8212bde59ba9fa70e2e2a2332ce67a1c36cd588d4d95fe42c1cd861b6513e29 |
|
MD5 | a75a012f470a9f51845c1ef9c2af0816 |
|
BLAKE2b-256 | f4245b1977414a55581bdb9ae460264ef791c84d70b1e71127c5b474e1a85999 |
Hashes for rchitect-0.3.13-cp36-cp36m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 95b7a8c8d9114e3e77cc365fe3fa261d7c86e441d72d9bf5466e086aadfc5f43 |
|
MD5 | f311319734da8d23f43a70df81959be7 |
|
BLAKE2b-256 | e48a1ac5d556b2805b4e06b4af5f009c95f1822675f4a157a6796977285f303b |
Hashes for rchitect-0.3.13-cp36-cp36m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c93cadcf207381e4992cc3235ccf8f319a8048d9495b5e802177c80865603b31 |
|
MD5 | 9279fb9edb5a9af6954891270d4297d1 |
|
BLAKE2b-256 | fa9b8ee03ca1470defb5703d597fcfa887f217462e3d61bde7fdb7c3939c305d |
Hashes for rchitect-0.3.13-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f9aed55fc830ea662e69aa01ad23129fb8dec59f30b0e1b616ee50c3a5b5aa42 |
|
MD5 | e521b165c642308000e91c80e933a254 |
|
BLAKE2b-256 | abf126dfffaf9ca97281d5036f1491833b0a49ce1d7d5301b1fb84431fcb85a4 |
Hashes for rchitect-0.3.13-cp35-cp35m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 41232158b5a5720a4a699f67a0906f36802cc121f71cb7617f5edcd2ed5e07b8 |
|
MD5 | d288ea9fe098ba05b2573cece4507386 |
|
BLAKE2b-256 | 637297d3c2aa5bdc523b659ddc258c36cb7f33224b68f6a7124ef4d5fd927c8a |
Hashes for rchitect-0.3.13-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5bdcb816089ddaac0f2c3c149fd4d50fafac5798e9797d4a662c57740a7465aa |
|
MD5 | d66b31286ce73b6dcec2ad4aedb56916 |
|
BLAKE2b-256 | d4b6c4639d2a0b0bb45f7d71a79dd99bf33dea9bd05248d2e2462669512e3a0b |
Hashes for rchitect-0.3.13-cp35-cp35m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 11c893fc029389fdbb027b159636c0ff2e5b35969e64e843f74bce163d91bb5b |
|
MD5 | 670c6bca3b533d68817a660bb1f87310 |
|
BLAKE2b-256 | c73a9c744ab737d59fc01f1ed672835720833046624cb953708bf45fc08a5d2a |
Hashes for rchitect-0.3.13-cp35-cp35m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8303d5d7e5296e0f2196cc2451c8cb96a3ce5b57c3bd976760bf60368506e3c8 |
|
MD5 | 293819147efc4c7ea2792af408eba81c |
|
BLAKE2b-256 | f8d07be99d48b40206047e37f7cdf6c93d7f94b20de8116fe427c52175053df9 |
Hashes for rchitect-0.3.13-cp34-cp34m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4978e172bc61bbaa277384186c25f3c650eb1b3eb6187144462f92e86742c2b3 |
|
MD5 | 405e73fefaa97f27dfbb13e8eefeba5a |
|
BLAKE2b-256 | 6437e5fd212e66227c3be8126d2489f64edd35f51c0483a2493e518228ea155c |
Hashes for rchitect-0.3.13-cp34-cp34m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 419a10bf5ef041f6ffa067c2368ab9e783f913ca0daa3fbaa2bd9c8700287f52 |
|
MD5 | 23150b7902ee50f0dae0ddd526aca3ef |
|
BLAKE2b-256 | 9876fa5023c392573bf4d6e9f601ae547b379f890b5a1a0b422d8e6b6778ac1f |
Hashes for rchitect-0.3.13-cp34-cp34m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c87c71012ee10efa2c1ab17e1aaf197ee2e0fffefb779fa0d11ed1c4a6ce829 |
|
MD5 | f75be7bc8f39f93907d0c982549c5f88 |
|
BLAKE2b-256 | 2cb6ef8481acf7d5b89c0ead34a7007404af769d456ac1d23c76a5ce7d6c6894 |
Hashes for rchitect-0.3.13-cp34-cp34m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e0121e4a823491791d4057d8e2a4d3da945c094ce9c62e54e990ceb40e55d309 |
|
MD5 | 0103ed76c947a6c1c86848ab6fe35b83 |
|
BLAKE2b-256 | 3583d4db147e0ff4b784f5bfa25d9d01b76a2b8b95674231957367252242ba19 |
Hashes for rchitect-0.3.13-cp34-cp34m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4e5a33ae9337905a41da863f9de549a3ef4ee57f6c47b8a9d299b60c7af1d318 |
|
MD5 | 996b5f04461369d25c2c26003d2f9a36 |
|
BLAKE2b-256 | ce1428f42885710907ad8921ef56b270c8fd89351171d7fe9dae565efe7514cf |
Hashes for rchitect-0.3.13-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 49496b74053cc5fdb54cb0398598e125d53423bb807577533f817f082f15f84c |
|
MD5 | fea4af162f04a8a37a68ebe9ed4ec788 |
|
BLAKE2b-256 | 1195ecd89943c2a98420622ad5990a35eb345e7250241b8554bbd3af20d889d2 |
Hashes for rchitect-0.3.13-cp27-cp27mu-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ac87e7c16761244d5ca91d763d74fecee29ea57f27aca9564883cbbeebc5baf7 |
|
MD5 | 38c83bafabdd26919d77f74fcc84888d |
|
BLAKE2b-256 | e18950c75918d40375bff82f1b781ffd974a36549c7e9e3240cf8ea753e97808 |
Hashes for rchitect-0.3.13-cp27-cp27m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bf94a53d0fdecbe5492c98b4b046e51fef8d2c91a900e91b9b36042cd4a3717a |
|
MD5 | f4a4d4e09ed1adf6eb6269db049c2e74 |
|
BLAKE2b-256 | 24ec4c41fe2d696bf9099d750c0ab75ada71703d9f69b00219f94d597a1ed2c5 |
Hashes for rchitect-0.3.13-cp27-cp27m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 548bc51abe927a283a4ab483debfc73abc8848c7651a71978833ba6a66cd1d1d |
|
MD5 | 243a070415d9ff225f749773c7879338 |
|
BLAKE2b-256 | 293c1aaeb86a9374ac9a49e297c755b49535dbd779619b9216210c5df3b04bf9 |
Hashes for rchitect-0.3.13-cp27-cp27m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dd13595731b8427e5fec6e50e6735d955e0bdfd74d544a06a293ae9db103c0df |
|
MD5 | d09190fc9e5aae9c936a22e136089b72 |
|
BLAKE2b-256 | 13570cccf16106ebd8e0e52f07fb70c6949c5bcec3064be0c7e74f975ebe6946 |
Hashes for rchitect-0.3.13-cp27-cp27m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bf58cf3eb0d60b29a01aed54964e4e616bf7fab01a3cb98b6dea3ece7d7ab3a5 |
|
MD5 | db80f3a6451991648c73467b5319c00d |
|
BLAKE2b-256 | dfbe151a89da113c8c06c0f33437738564cddb62c42b25e79ac1aa611ae8d15d |
Hashes for rchitect-0.3.13-cp27-cp27m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 77ce2079e8bb620141d85e715f2d79641304d9ece8160a4e74f69373601c63e7 |
|
MD5 | a2ec876f06340ef836a350a08b328e25 |
|
BLAKE2b-256 | 5028d7a21e133b86f4d4ff2eb5cf31219c25db83233c59b1b727fc1aa9a8fe68 |