close_db | R Documentation |
This is a convenience function that is simply a wrapper around DBI::dbDisconnect()
.
close_db(db)
db |
A database connection to an m-Path Sense database. |
Returns invisibly regardless of whether the database is active, valid, or even exists.
open_db()
for opening an mpathsenser database.
# First create a database in a temporary directory
db <- create_db(tempdir(), "mydb.db")
# Then close it
close_db(db)
# You can even try to close a database that is already closed. This will not trigger an error.
close_db(db)
# Cleanup
file.remove(file.path(tempdir(), "mydb.db"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.