queryr
provides tools to aid in querying SQL databases through R.
You can install:
the latest released version from CRAN with
r
install.packages("queryr")
the latest development version from github with
r
if (packageVersion("devtools") < 1.6) {
install.packages("devtools")
}
devtools::install_github("paulhendricks/queryr")
If you encounter a clear bug, please file a minimal reproducible example on github.
library(dplyr, warn.conflicts = FALSE)
library(queryr)
raw_qry <-
"
SELECT *
FROM SOME_TABLE
WHERE CONDITION
GROUP BY VARIABLES;
"
raw_qry %>% remove_whitespace
#> [1] "SELECT * FROM SOME_TABLE WHERE CONDITION GROUP BY VARIABLES;"
raw_qry %>% remove_whitespace %>% remove_semicolon
#> [1] "SELECT * FROM SOME_TABLE WHERE CONDITION GROUP BY VARIABLES"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.