## This will only work when a copy of the database exists:
if (check_ecotox_availability()) {
con <- dbConnectEcotox()
## check if the connection works by listing the tables in the database:
dbListTables(con)
## Let's be a good boy/girl and close the connection to the database when we're done:
dbDisconnectEcotox(con)
}
Run the code above in your browser using DataLab