Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eitsupi/r-glaredb
R bindings for GlareDB
https://github.com/eitsupi/r-glaredb
arrow glaredb r rust sql
Last synced: 2 months 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 (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-21T07:10:09.000Z (3 months ago)
- Last Synced: 2024-10-21T10:08:39.635Z (3 months ago)
- Topics: arrow, glaredb, r, rust, sql
- Language: R
- Homepage: https://eitsupi.github.io/r-glaredb/
- Size: 1.52 MB
- Stars: 2
- Watchers: 1
- Forks: 2
- Open Issues: 7
-
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: falseknitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```# R bindings for GlareDB
[![R-multiverse status](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fcommunity.r-multiverse.org%2Fapi%2Fpackages%2Fglaredb&query=%24.Version&label=r-multiverse)](https://community.r-multiverse.org/glaredb)
[![glaredb status badge](https://eitsupi.r-universe.dev/badges/glaredb)](https://eitsupi.r-universe.dev/glaredb)
[![CRAN status](https://www.r-pkg.org/badges/version/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
```