#' Create a pool of connections
#'
#' Use a list of options (usually created through running \code{credentials_extract})
#' to create a pool of connections to the psql database.
#' @param options_list A list of options for connecting to a database, usually generated by calling \code{credentials_extract()}
#' @import RPostgreSQL
#' @import pool
#' @import DBI
#' @export
create_pool <- function(options_list){
# Establish connection with database
options_list$drv <- DBI::dbDriver("PostgreSQL")
out <- do.call(dbPool, options_list)
# Return the connection object
return(out)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.