Python-style imports of R files and packages
An rpy2 wrapper package to enable Python-style imports of R files and packages and expose them as commandline tools (based on python-fire), including automatic pandas object conversion if it is installed.
Setup
pip install import-r
Usage
Import any R installed package or R file in your working dir or on either $RPYPATH or $R_LIBS paths
like any other python module:
from r import test
import r.test as rtest
from r import ggplot2
import r
r.path.append('dir/to/my/rfiles')
from r import my_rfile
Commandline interface
Install with cli support (pip install import-r[rcli]) and then use R files and packages on the commandline
like this:
rcli utils install_packages ggplot2
rcli path/to/my/rfile.R function1 --arg=2 --flag
Test and release
pip install .[test]
pytest
python setup.py sdist
twine upload dist/*
Once everything passed successfully, tag and push to github:
version=0.1
git commit -m "Release v${version}"
git tag "v$version"
git push; git push --tags
Credit
Michel Wortmann michel.wortmann@ouce.ox.ac.uk
MIT Licence
Metadata
Release files for import-r 0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| import-r-0.2.tar.gz | 6.4 kB | Without provenance | Details for import-r-0.2.tar.gz |
Release files / import-r-0.2.tar.gz
| Download URL | import-r-0.2.tar.gz |
|---|---|
| Size | 6.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cecff5af495901f9d9c49e531d3d477c5bafd4a7d2196d063101066a01e479ff
|
|
BLAKE2b-256 checksum How to use checksums |
2b61f0275e3d1d48e272e4f918afbb2d14eb93aa081010491bf37d769605d81d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.6
|
Security for import-r 0.2
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.