open_db {mpathsenser}R Documentation

Open an mpathsenser database.

Description

[Stable]

Usage

open_db(path = getwd(), db_name = "sense.db")

Arguments

path

The path to the database. Use NULL to use the full path name in db_name.

db_name

The name of the database.

Value

A connection to an mpathsenser database.

See Also

close_db() for closing a database; copy_db() for copying (part of) a database; index_db() for indexing a database; get_data() for extracting data from a database.

Examples

# First create a database in a temporary directory
db <- create_db(tempdir(), "mydb.db")
close_db(db)
DBI::dbIsValid(db) # db is closed

# Then re-open it
db2 <- open_db(tempdir(), "mydb.db")
DBI::dbIsValid(db2) # db is opened

# Cleanup
close_db(db2)
file.remove(file.path(tempdir(), "mydb.db"))

[Package mpathsenser version 1.2.3 Index]