Skip to main content

Python package for using R in Python

Project description

WrapR

PyPI Status Python Version License

Documentation Tests Coverage Quality Gate Status

pre-commit Black Ruff Poetry

Features

`WrapR` 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 wrapr 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 WrapR 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, WrapR 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.1.tar.gz (15.7 kB view details)

Uploaded Source

Built Distribution

rwrapr-0.1.1-py3-none-any.whl (19.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: rwrapr-0.1.1.tar.gz
  • Upload date:
  • Size: 15.7 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.1.tar.gz
Algorithm Hash digest
SHA256 954dae1b85ac9213c2c0e8e607db8dbccf892fe6e8ba41a72532336f217e936b
MD5 5ac685a3c779d614dd177e2df9aaa822
BLAKE2b-256 027017e2ced72d55951bdc800ab4ffb804c4f8f00e6657e37a83aed1c9ecdff9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rwrapr-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 19.3 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1e1468947173299a6120286e435ce432473e498a167fd72c325003bc01f7b7c5
MD5 d09ad2597711790ea69b5962d4c1f221
BLAKE2b-256 36e1921768092a63ccd639447c223dbe421ef27a2d5b0ca05e7bf5d498c186cd

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