Skip to main content

Python package for using R in Python

Project description

RWrapR

PyPI Status Python Version License

Documentation Tests Coverage Quality Gate Status

pre-commit Black Ruff Poetry

Features

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)"))

To do

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

Requirements

  • TODO

Installation

You can install RWrapR via pip from PyPI:

pip install rwrapr

Usage

Please see the Reference Guide for details.

Contributing

Contributions are very welcome. To learn more, see the Contributor Guide.

License

Distributed under the terms of the MIT license, RWrapR is free and open source software.

Issues

If you encounter any problems, please file an issue along with a detailed description.

Credits

This project was generated from Statistics Norway's SSB PyPI Template.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rwrapr-0.1.2.tar.gz (16.0 kB view details)

Uploaded Source

Built Distribution

rwrapr-0.1.2-py3-none-any.whl (19.0 kB view details)

Uploaded Python 3

File details

Details for the file rwrapr-0.1.2.tar.gz.

File metadata

  • Download URL: rwrapr-0.1.2.tar.gz
  • Upload date:
  • Size: 16.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for rwrapr-0.1.2.tar.gz
Algorithm Hash digest
SHA256 fc31c4f65acd946990dc7a43ae033a2bffe00d43a691a6365dc4b552d93a13b6
MD5 ade4ec8e1fe0996421863ebd553db9c7
BLAKE2b-256 ff294826fc34270894fdb2d93edd35db2b8b05247dd1337aa7adda61e41fa199

See more details on using hashes here.

File details

Details for the file rwrapr-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: rwrapr-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 19.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for rwrapr-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c26cce7b7a132e7fe1354325ada78ab0eefba8f8db3196a47e23f4aa6d85b950
MD5 055839b2f8af506fde1ae9095348acc7
BLAKE2b-256 20a32accfb52c432e6eea193428f1cebcce3c4fbbcc9f1efa9a521ad6b152cb0

See more details on using hashes here.

Supported by

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