| connect_pg | R Documentation |
This is a convenience wrapper to DBI::dbConnect() where if the database credentials
are saved in the .REnviron file, they will be automatically read.
connect_pg(getenv = FALSE, verbose = FALSE, ...)
getenv |
get credentials from the local .REnviron file |
verbose |
print database connection information from |
... |
other arguments to pass through |
All other arguments pass through dbConnect() except for drv which is already specified
to RPostgres::Postgres()
connection to Postgres database
## Not run:
connect_pg(getenv = FALSE,
drv = DBI::dbDriver("Postgres"),
port = 5432,
dbname = "mydb",
user = "myusername",
password = "mypw"
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.