https://github.com/eitsupi/r-glaredb
R bindings for GlareDB
https://github.com/eitsupi/r-glaredb
arrow glaredb r rust sql
Last synced: about 1 year ago
JSON representation
R bindings for GlareDB
- Host: GitHub
- URL: https://github.com/eitsupi/r-glaredb
- Owner: eitsupi
- License: agpl-3.0
- Created: 2023-10-14T08:18:10.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-02-03T08:02:54.000Z (about 1 year ago)
- Last Synced: 2025-03-15T01:05:49.491Z (about 1 year ago)
- Topics: arrow, glaredb, r, rust, sql
- Language: R
- Homepage: https://eitsupi.github.io/r-glaredb/
- Size: 1.82 MB
- Stars: 3
- Watchers: 1
- Forks: 2
- Open Issues: 10
-
Metadata Files:
- Readme: README.Rmd
- Changelog: NEWS.md
- License: LICENSE.md
Awesome Lists containing this project
README
---
output:
github_document:
html_preview: false
---
```{r}
#| include: false
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# R bindings for GlareDB
[](https://community.r-multiverse.org/glaredb)
[](https://eitsupi.r-universe.dev/glaredb)
[](https://CRAN.R-project.org/package=glaredb)
This package is based on GlareDB `r as.data.frame(glaredb_sql("select version()"))$version`.
Check out the [GlareDB repo](https://github.com/GlareDB/glaredb) for details.
## Installation
This package can be installed from R-multiverse.
If available, a binary package will be installed.
**Currently, Windows is not supported. Please use WSL2.**
```r
Sys.setenv(NOT_CRAN = "true")
install.packages("glaredb", repos = "https://community.r-multiverse.org")
```
## Examples
Use GlareDB directly in R to query and analyzer a variety of data sources, including `arrow::Table` and `polars::RPolarsDataFrame`.
```{r}
library(glaredb)
library(polars)
df <- pl$DataFrame(
A = 1:5,
fruits = c("banana", "banana", "apple", "apple", "banana"),
B = 5:1,
C = c("beetle", "audi", "beetle", "beetle", "beetle")
)
df2 <- glaredb_sql("select * from df where fruits = 'banana'") |>
as_polars_df()
df2
```