{"id":26426345,"url":"https://github.com/prql/prqlc-r","last_synced_at":"2025-04-09T05:12:39.968Z","repository":{"id":65380642,"uuid":"556193475","full_name":"PRQL/prqlc-r","owner":"PRQL","description":"R Bindings for prqlc","archived":false,"fork":false,"pushed_at":"2025-03-28T13:29:04.000Z","size":9268,"stargazers_count":56,"open_issues_count":10,"forks_count":2,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-01T22:44:25.767Z","etag":null,"topics":["prql","r","rust","sql"],"latest_commit_sha":null,"homepage":"https://prql.github.io/prqlc-r/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PRQL.png","metadata":{"files":{"readme":"README.Rmd","changelog":"NEWS.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-10-23T09:26:20.000Z","updated_at":"2025-03-28T13:27:01.000Z","dependencies_parsed_at":"2023-10-10T14:57:22.195Z","dependency_job_id":"45f0f2f1-2de6-46e0-ba96-405f3847b4c9","html_url":"https://github.com/PRQL/prqlc-r","commit_stats":null,"previous_names":["prql/prqlc-r","eitsupi/prqlr"],"tags_count":31,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PRQL%2Fprqlc-r","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PRQL%2Fprqlc-r/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PRQL%2Fprqlc-r/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PRQL%2Fprqlc-r/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PRQL","download_url":"https://codeload.github.com/PRQL/prqlc-r/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247980844,"owners_count":21027808,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["prql","r","rust","sql"],"created_at":"2025-03-18T03:29:39.156Z","updated_at":"2025-04-09T05:12:39.938Z","avatar_url":"https://github.com/PRQL.png","language":"R","readme":"---\noutput:\n  github_document:\n    html_preview: false\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r}\n#| include: false\n\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\"\n)\n```\n\n# prqlr \u003cimg src=\"man/figures/logo.png\" align=\"right\" width=\"150\"/\u003e\n\n\u003c!-- badges: start --\u003e\n[![prqlr status badge](https://prql.r-universe.dev/badges/prqlr)](https://prql.r-universe.dev)\n[![CRAN status](https://www.r-pkg.org/badges/version/prqlr)](https://CRAN.R-project.org/package=prqlr)\n[![R-multiverse status](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fcommunity.r-multiverse.org%2Fapi%2Fpackages%2Fprqlr\u0026query=%24.Version\u0026label=r-multiverse)](https://community.r-multiverse.org/prqlr)\n\u003c!-- badges: end --\u003e\n\nR bindings for [the `prqlc` Rust library](https://github.com/prql/prql),\npowered by [`savvy`](https://github.com/yutannihilation/savvy).\n\nThis version supports PRQL `r prqlr::prql_version()`.\n\n## Installation\n\nRequires R 4.2.0 or later.\n\nThis latest release version of this package can be installed from CRAN or [R-multiverse](https://r-multiverse.org).\nIf available, a binary package will be installed.\n\n```r\n# Install from CRAN\ninstall.packages(\"prqlr\")\n```\n\n```r\n# Install from the R-multiverse Community Repository\ninstall.packages(\"prqlr\", repos = \"https://community.r-multiverse.org\")\n```\n\nDevelopment version of this package can be installed from PRQL's\n[R-universe](https://prql.r-universe.dev/prqlr) repository.\n\n```r\n# Install from R-universe\ninstall.packages(\"prqlr\", repos = \"https://prql.r-universe.dev\")\n```\n\nFor source installation, pre-built Rust libraries may be available\nif the environment variable `NOT_CRAN` is set to `\"true\"`. (Or, set `LIBPRQLR_BUILD` to `\"false\"`)\n\n```r\nSys.setenv(NOT_CRAN = \"true\")\ninstall.packages(\"prqlr\")\n```\n\nOr, the Rust toolchain (Rust `r RcppTOML::parseTOML(\"src/rust/Cargo.toml\")$package$\"rust-version\"` or later)\nmust be configured to build the Rust library.\n\nPlease check the \u003chttps://github.com/r-rust/hellorust\u003e repository for about Rust code in R packages.\n\n## Examples\n\n```{r}\nlibrary(prqlr)\n\n\"from mtcars | filter cyl \u003e 6 | select {cyl, mpg}\" |\u003e\n  prql_compile() |\u003e\n  cat()\n```\n\nPRQL's pipelines can be joined by the newline character (`\\n`), or actual newlines in addition to `|`.\n\n```{r}\n\"from mtcars \\n filter cyl \u003e 6 \\n select {cyl, mpg}\" |\u003e\n  prql_compile() |\u003e\n  cat()\n```\n\n```{r}\n\"from mtcars\nfilter cyl \u003e 6\nselect {cyl, mpg}\" |\u003e\n  prql_compile() |\u003e\n  cat()\n```\n\nThanks to the `{tidyquery}` package,\nwe can even convert a PRQL query to a SQL query and then to a `{dplyr}` query!\n\n```{r}\n\"from mtcars\nfilter cyl \u003e 6\nselect {cyl, mpg}\" |\u003e\n  prql_compile() |\u003e\n  tidyquery::show_dplyr()\n```\n\n## `{knitr}` integration\n\nUsing `{prqlr}` with `{knitr}` makes it easy to create documents that lists PRQL queries and a translated SQL queries,\nor documents that lists PRQL queries and tables of data retrieved by PRQL queries.\n\nPlease check the vignette `vignette(\"knitr\", \"prqlr\")` for details.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprql%2Fprqlc-r","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprql%2Fprqlc-r","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprql%2Fprqlc-r/lists"}