Make a new ODM2 sqlite database
create_sqlite(dir = ".", filename = "odm2.sqlite", connect = FALSE)
dir | Name of existing directory for the sqlite database file to be created in. Defaults to current directory |
---|---|
filename | Filename for sqlite database file. Defaults to "odm2", making a file called odm2.sqlite |
connect | Whether or not to return the database connection object |
Returns database connecton object if connect = TRUE, otherwise just creates file.
This function copies a template sqlite file with the ODM2 schema, controlled vocabularies, and units to the specified location.
db <- create_sqlite(dir = tempdir(), connect = TRUE)