parse_expression {queryparser} | R Documentation |
Parse a SQL expression
Description
Parses a SQL expression into an R expression
Usage
parse_expression(expr, tidyverse = FALSE, secure = TRUE)
Arguments
expr |
a character string containing a SQL expression |
tidyverse |
set to |
secure |
set to |
Details
The expression must not end with a column alias assignment.
Use extract_alias
to extract and remove column alias
assignments.
The expression must not contain any unquoted whitespace characters except
spaces, and there must be no unquoted runs or two or more spaces. The
expression must not contain line comments (--
) or block comments
(/* */
). Use squish_sql
to satisfy these whitespace
requirements and remove any comments.
Value
an unevaluated R expression (a call
)
See Also
Examples
expr <- "round(AVG(arr_delay))"
parse_expression(expr)