Last chance! 50% off unlimited learning
Sale ends in
Allows the user to generate and execute select, insert, update and delete 'SQL' queries the underlying database without having to explicitly write 'SQL' code.
Release | Usage | Development |
---|---|---|
install.packages("RSQL")
Install the R package using the following commands on the R console:
devtools::install_github("rOpenStats/RSQL", build_opts = NULL)
library(RSQL)
To get started execute the following commands:
# 0. Load libraries
library(RSQL)
# 1. RSQL
db.name <- getMtcarsdbPath()
rsql <- createRSQL(drv = RSQLite::SQLite(), dbname = db.name)
query_sql <- rsql$gen_select(
select_fields = c("*"),
table = "mtcars")
query_sql <- rsql$gen_select(
select_fields = c("mpg", "cyl", "disp", "hp", "drat", "wt", "qsec", "vs", "am"),
table = "mtcars",
where_fields = "gear",
where_values = 4)
mtcars.observed <- rsql$execute_select(query_sql)
Please note that the 'RSQL' project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.
install.packages('RSQL')