Learn R Programming

mpathsenser (version 1.2.3)

create_db: Create a new mpathsenser database

Description

[Stable]

Usage

create_db(path = getwd(), db_name = "sense.db", overwrite = FALSE)

Value

A database connection using prepared database schemas.

Arguments

path

The path to the database.

db_name

The name of the database.

overwrite

In case a database with db_name already exists, indicate whether it should be overwritten or not. Otherwise, this option is ignored.

Examples

Run this code
# Create a new database in a temporary directory
db <- create_db(tempdir(), "mydb.db")

# You can also create an in-memory database
db2 <- create_db(path = NULL, ":memory:")

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

Run the code above in your browser using DataLab