chdb icon indicating copy to clipboard operation
chdb copied to clipboard

R API!

Open alanpaulkwan opened this issue 2 years ago • 2 comments

R has a wonderful data science community. It would be great if there was an R binding.

The DuckDB API is built here, I wonder if this could be template code:

https://github.com/duckdb/duckdb/tree/master/tools/rpkg/R

Worst case, R can do reticulate, which is a Python wrapper.

alanpaulkwan avatar Jul 28 '23 08:07 alanpaulkwan

Thanks for the request. R binding can be supported in libchdb where we have hooks for Go, NodeJS, Rust, etc.

I'm not familiar with R development, but it seems very close to the C/C++ binding. This template could be a starting point: https://gist.github.com/lmangani/e30edae31ad939e539989b8e326fb449

lmangani avatar Jul 28 '23 08:07 lmangani

I'm a contributor to the RClickhouse package that integrates Clickhouse with R's DBI package. We are wrapping the C++ Clickhouse library to do that. One of the major struggles was to handle data types (R still doesn't support 64bit INTs for example). Maybe our package can provide inspiration. https://github.com/IMSMWU/RClickhouse/tree/master

dwinkler1 avatar Mar 18 '24 14:03 dwinkler1