polars icon indicating copy to clipboard operation
polars copied to clipboard

Provide an interface for R language

Open XianglinZhang-risker opened this issue 3 years ago • 16 comments

Hello, have you considered providing an interface for R language? R language has packages to call Rust. I don’t know the difficulty level. If you want, I hope we can work together or find someone who is very good at R language to complete this task. This must be a great job, and I have observed that it is faster than data.table. Thanks.

XianglinZhang-risker avatar Jul 19 '21 02:07 XianglinZhang-risker

@andy-thomason & @jeroen might able to leave some suggestions

jonekeat avatar Jul 20 '21 13:07 jonekeat

@andy-thomason & @jeroen might able to leave some suggestions

XianglinZhang-risker avatar Jul 21 '21 01:07 XianglinZhang-risker

Sorry, I clicked close by mistake.

Of course, they are all outstanding contributors to the R language, and extendr provides a good way to call Rust for R. It would be great if they were willing to join.

XianglinZhang-risker avatar Jul 21 '21 01:07 XianglinZhang-risker

This looks like an interesting project. I made a fairly large contribution to Arrow a couple of years ago as we were using it for bioinformatics data at work.

It should be fairly easy to generate bindings using extendr and you would be welcome to raise an issue and get some help from the team.

I'll try to look over your project in the next few days.

andy-thomason avatar Jul 21 '21 11:07 andy-thomason

Has any progress on this topic been made? I am a full-time R developer with an interest in high-performance data frame libraries as well as an inkling to learn Rust.

If someone has already started an R project, I would love to contribute.

ChristopherEeles avatar Sep 27 '21 21:09 ChristopherEeles

Because of my lack of programming skills and busy work, I did not start this project.

XianglinZhang-risker avatar Sep 28 '21 05:09 XianglinZhang-risker

We (the extendr team) would be happy to help to interface anything to R.

https://github.com/extendr/extendr

andy-thomason avatar Sep 28 '21 09:09 andy-thomason

We (the extendr team) would be happy to help to interface anything to R.

https://github.com/extendr/extendr

Great to hear there is so much interest in this. I'd welcome such an undertaking and would be very glad to help with technical guidance. But I don't know any R, and don't have the time to help maintain another API, so this would become a community effort.

ritchie46 avatar Oct 20 '21 11:10 ritchie46

I would be happy to contribute to development of the R API. But I am in the opposite position of knowing very little Rust. That being said, the documentation for the Polars Rust library is very good.

In terms of maintenance, I will need too speak to my boss. I work in an academic lab developing R packages/pipelines for computational biology research. If I can get our lab on board, we could likely handle most of the maintenance of the R code. Or at least coordinate efforts on the R side of development.

Maybe we can recruit contributors via GitHub Discussions on this repo?

Pending management signing off I could likely start development work in Q1 2021.

ChristopherEeles avatar Oct 21 '21 06:10 ChristopherEeles

That would be great. It would be good to have some largeish projects being ported.

I suggest you raise an issue in https://github.com/extendr/extendr/issues

We have a number of expert R users who can help out with the look and feel.

andy-thomason avatar Oct 21 '21 14:10 andy-thomason

cc @dbdahl also for his cargo framework

jonekeat avatar Oct 22 '21 09:10 jonekeat

For the Rust side of things, I believe all should be in place, and if something is missing. I can pick that up.

The existent python bindings could act as standard implementation and should help the migration a lot, I believe.

ritchie46 avatar Oct 22 '21 09:10 ritchie46

Polars looks like a really great project. Those are impressive benchmarks. Having an R interface for it works be great.

Thanks @jonekeat for mentioning my cargo framework for R packages based on Rust. I would be glad to engage with anyone who wants to develop an package using it, but I don't have the bandwidth to contribute substantially to the heavy lifting.

dbdahl avatar Oct 22 '21 13:10 dbdahl

Happy to help with this as well. I have some but not a lot of Rust experience. I have a fair amount of R programming background. One project to look for inspiration from would be: https://dtplyr.tidyverse.org since it would be cool to be able to keep as much of the dplyr syntax with a faster polars backend (eventually).

lmeninato avatar Mar 09 '22 03:03 lmeninato

For those who don’t want to follow the daisy chain of links, just to point out that an R implementation of polars is already quite far under way thanks to @sorhawell: https://github.com/sorhawell/minipolars/

grantmcdermott avatar Nov 05 '22 15:11 grantmcdermott

Hi all! I have moved and renamed minipolars to here:

https://github.com/rpolars/rpolars

Though quite far, I have to postpone target deadline to March '23. If any want to contribute I could really need some help:

  • You can easily contribute also as a rust beginner as maybe half of implementations are simple pass-troughs of the rust-polars API, see contribution example here
  • Anybody are also welcome to just try it out and post their opinion on the rpolars-issue track or send me an email. It takes ~15 seconds to install R-package from weekly released binaries see rpolars readme. Latest documentation shows what have been translated so far.

A great thanks to the pola-rs organization for making all this possible!

sorhawell avatar Nov 25 '22 20:11 sorhawell

New location of this project is here: https://github.com/pola-rs/r-polars

CGMossa avatar Jan 03 '23 11:01 CGMossa

Given that development of r-polars has been officially ported to https://github.com/pola-rs org, I think this issue can be closed now.

grantmcdermott avatar Jan 03 '23 16:01 grantmcdermott

Jep. :)

ritchie46 avatar Jan 03 '23 16:01 ritchie46