queryparser 0.3.2 Package Reference: Translate SQL Queries into R Expressions

queryparser 0.3.2 is an R package that translates SQL SELECT statements into lists of R expressions, with functions for parsing, splitting, squishing and…


queryparser 0.3.2 Package Reference: Translate SQL Queries into R Expressions - cover page
Brand
queryparser
Category
Other software
Document type
Other
Language
English
Pages
8
File format
PDF
File size
87 KB
Published
29 November, 2026
Updated
29 November, 2026
MD5 checksum
06778EB59E038BA70FD9E20EF67BBB3E

About this manual

queryparser is an R package that translates SQL SELECT statements into lists of R expressions. It provides functions to parse a query or expression, split a query into clauses, extract column aliases, remove prefixes from column references, and squish whitespace and comments.

The package is maintained by Ian Cook and is licensed under the Apache License 2.0. It depends on no compilation and suggests testthat and covr for testing.

What's inside

  • column_references
  • extract_alias
  • parse_expression
  • parse_query
  • split_query
  • squish_sql
  • unqualify_query

Specifications

Version0.3.2
LicenseApache License 2.0
NeedsCompilationno
EncodingUTF-8
RepositoryCRAN
Date/Publication2023-01-09 21:20:02 UTC

Frequently asked questions

What does the queryparser package do?

It translates SQL SELECT statements into lists of R expressions, returning an unevaluated R expression or a list of clause sublists.

How do you remove a column alias from a SQL expression?

Use extract_alias, which returns the expression with the alias assignment removed and the alias as its name.

How do you remove whitespace and comments from a SQL query?

Use squish_sql, which replaces every unquoted run of whitespace with a single space and removes line and block comments.

How do you remove table prefixes from column references?

Use unqualify_query with a character vector of table names or aliases as prefixes, and optionally an except vector of column references to leave as is.

Download PDF (87 KB)