View source: R/database_access.r
dbConnectEcotox | R Documentation |
Wrappers for dbConnect()
and
dbDisconnect()
methods.
dbConnectEcotox(path = get_ecotox_path(), version, ...)
dbDisconnectEcotox(conn, ...)
path |
A |
version |
A |
... |
Arguments that are passed to |
conn |
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 DBI::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:
dbListTables(con)
## Let's be a good boy/girl and close the connection to the database when we're done:
dbDisconnectEcotox(con)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.