Skip to content

Instantly share code, notes, and snippets.

@kos59125
Created August 16, 2018 03:21
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kos59125/5c75ba5d6e0ec181d3fa8f5d3274c629 to your computer and use it in GitHub Desktop.
Save kos59125/5c75ba5d6e0ec181d3fa8f5d3274c629 to your computer and use it in GitHub Desktop.
DB connection using config package
default:
db:
drv: !expr RPostgres::Postgres()
host: localhost
password: password
user: user
dbname: dbname
library(DBI)
con <- do.call(dbConnect, config::get("db"))
# do stuff
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment