RWrapR
is a python
package for using R inside of python.
It is built using rpy2
, but attempts to be more convient to use.
Ideally you should never have to worry about using R
objects,
instead treating R
functions as normal python
functions, where the inputs
and outputs are python
objects.
import rwrapr as wr
import pandas as pd
import numpy as np
dplyr = wr.library("dplyr")
dt = wr.library("datasets")
dplyr.last(x=np.array([1, 2, 3, 4]))
dplyr.last(x=[1, 2, 3, 4])
iris = dt.iris
df = dplyr.mutate(iris, Sepal=wr.Lazily("round(Sepal.Length * 2, 0)"))
1. Port all test files for SSB-GaussSuppression, and SSBtools
2. Names/Dimnames for Vectors/Arrays/Matrices
3. Factors/Ordered Vectors
4. Better warning handling (this will likely be tricky)
- Sometimes we will get datatypes which are incompatible,
e.g., warning accompanied by
5. Better handling of missing values.
6. renv.script() for creating r scripts
- TODO
You can install RWrapR via pip from PyPI:
pip install rwrapr
Please see the Reference Guide for details.
Contributions are very welcome. To learn more, see the Contributor Guide.
Distributed under the terms of the MIT license, RWrapR is free and open source software.
If you encounter any problems, please file an issue along with a detailed description.
This project was generated from Statistics Norway's SSB PyPI Template.