dbConnectEcotox: Open or close a connection to the local ECOTOX database

View source: R/database_access.r

dbConnectEcotoxR Documentation

Open or close a connection to the local ECOTOX database


Wrappers for dbConnect and dbDisconnect methods.


dbConnectEcotox(path = get_ecotox_path(), version, ...)

dbDisconnectEcotox(conn, ...)



A character string with the path to the location of the local database (default is get_ecotox_path()).


A character string referring to the release version of the database you wish to locate. It should have the same format as the date in the EPA download link, which is month, day, year, separated by underscores ("%m_%d_%Y"). When missing, the most recent available copy is selected automatically.


Arguments that are passed to dbConnect method or dbDisconnect method.


An open connection to the ECOTOX database that needs to be closed.


Open or close a connection to the local ECOTOX database. These functions are only required when you want to send custom queries to the database. For most searches the search_ecotox function will be adequate.


A database connection in the form of a DBIConnection-class object. The object is tagged with: a time stamp; the package version used; and the file path of the SQLite database used in the connection. These tags are added as attributes to the object.


Pepijn de Vries


## Not run: 
## This will only work when a copy of the database exists:
con <- dbConnectEcotox()

## check if the connection works by listing the tables in the database:

## Let's be a good boy/girl and close the connection to the database when we're done:

## End(Not run)

ECOTOXr documentation built on Nov. 17, 2022, 5:07 p.m.