- Notifications
You must be signed in to change notification settings - Fork2
R Bindings for prqlc
License
Unknown and 2 other licenses found
Licenses found
PRQL/prqlc-r
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
R bindings fortheprqlc Rust library,powered bysavvy.
This version supports PRQL 0.13.5.
Requires R 4.2.0 or later.
This latest release version of this package can be installed from CRANorR-multiverse. If available, a binarypackage will be installed.
# Install from CRANinstall.packages("prqlr")
# Install from the R-multiverse Community Repositoryinstall.packages("prqlr",repos="https://community.r-multiverse.org")
Development version of this package can be installed from PRQL’sR-universe repository.
# Install from R-universeinstall.packages("prqlr",repos="https://prql.r-universe.dev")
For source installation, pre-built Rust libraries may be available ifthe environment variableNOT_CRAN is set to"true". (Or, setLIBPRQLR_BUILD to"false")
Sys.setenv(NOT_CRAN="true")install.packages("prqlr")
Or, the Rust toolchain (Rust 1.84.0 or later) must be configured tobuild the Rust library.
Please check thehttps://github.com/r-rust/hellorust repository forabout Rust code in R packages.
library(prqlr)"from mtcars | filter cyl > 6 | select {cyl, mpg}"|> prql_compile()|> cat()#> SELECT#> cyl,#> mpg#> FROM#> mtcars#> WHERE#> cyl > 6#>#> -- Generated by PRQL compiler version:0.13.5 (https://prql-lang.org)
PRQL’s pipelines can be joined by the newline character (\n), oractual newlines in addition to|.
"from mtcars\n filter cyl > 6\n select {cyl, mpg}"|> prql_compile()|> cat()#> SELECT#> cyl,#> mpg#> FROM#> mtcars#> WHERE#> cyl > 6#>#> -- Generated by PRQL compiler version:0.13.5 (https://prql-lang.org)
"from mtcarsfilter cyl > 6select {cyl, mpg}"|> prql_compile()|> cat()#> SELECT#> cyl,#> mpg#> FROM#> mtcars#> WHERE#> cyl > 6#>#> -- Generated by PRQL compiler version:0.13.5 (https://prql-lang.org)
Thanks to the{tidyquery} package, we can even convert a PRQL query toa SQL query and then to a{dplyr} query!
"from mtcarsfilter cyl > 6select {cyl, mpg}"|> prql_compile()|>tidyquery::show_dplyr()#> mtcars %>%#> filter(cyl > 6) %>%#> select(cyl, mpg)
Using{prqlr} with{knitr} makes it easy to create documents thatlists PRQL queries and a translated SQL queries, or documents that listsPRQL queries and tables of data retrieved by PRQL queries.
Please check the vignettevignette("knitr", "prqlr") for details.
About
R Bindings for prqlc
Topics
Resources
License
Unknown and 2 other licenses found
Licenses found
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Uh oh!
There was an error while loading.Please reload this page.
Contributors5
Uh oh!
There was an error while loading.Please reload this page.
