Description Usage Arguments Examples
Create a class representing a connection to a MareFrame DB
1 2 3 4 5 6 | mfdb(case_study_name,
db_params = list(),
destroy_schema = FALSE,
save_temp_tables = FALSE)
mfdb_disconnect(mdb)
|
case_study_name |
The name of the case study you are working with, should be a valid
name from |
db_params |
Extra parameters to supply to a |
destroy_schema |
Optional boolean. If true, all mfdb tables will be dropped, allowing
you to recreate your schema. Returns NULL, you need to call |
save_temp_tables |
Optional boolean. If true, any temporary tables will be made permanent for later inspection. |
mdb |
Database connection created by |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## Not run:
# Connect to local DB, as the Iceland case study
mdb <- mfdb('Iceland')
# Connect to "mf2014" on remote DB server
mdb <- mfdb('Iceland', db_params = list(host = "db.mareframe-fp7.org", dbname = "mf2014")
# Stop it and tidy up
mfdb_disconnect(mdb)
# Destroy everything, since schema was out of date.
mfdb('', destroy_schema = TRUE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.