## try to load our module and abort if this fails stopifnot(require(RPostgreSQL)) ## load the PostgresSQL driver drv <- dbDriver("PostgreSQL")