Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

R Bindings for prqlc

License

Unknown and 2 other licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md
Unknown
LICENSE.note
NotificationsYou must be signed in to change notification settings

PRQL/prqlc-r

Repository files navigation

prqlr status badgeCRAN statusR-multiverse status

R bindings fortheprqlc Rust library,powered bysavvy.

This version supports PRQL 0.13.5.

Installation

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.

Examples

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)

{knitr} integration

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

Unknown
LICENSE
MIT
LICENSE.md
Unknown
LICENSE.note

Stars

Watchers

Forks

Contributors5


[8]ページ先頭

©2009-2025 Movatter.jp