Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ODBC and R #39

Open
mikerspencer opened this issue Apr 14, 2021 · 1 comment
Open

ODBC and R #39

mikerspencer opened this issue Apr 14, 2021 · 1 comment

Comments

@mikerspencer
Copy link

I suggest replacing the R/SQL code with the following:

library("RSQLite")
dbfile = "C:/Users/pfsmy/OneDrive/UoM/Carpentry/Datasets/SN7577.sqlite"
mydb = dbConnect(drv = SQLite(), dbname=dbfile)
results = dbGetQuery(mydb, "SELECT * FROM SN7577")
dbDisconnect(mydb)

Using dbGetQuery is more straightforward and makes the code easier to read.

@henrykironde
Copy link

Thanks @mikerspencer, related issue in swcarpentry/sql-novice-survey#331

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants