Skip to contents

'db_connect' establishes a DuckDB connection in the location specified or in memory, and confirms that the 'httpfs' extension is installed.

Usage

db_connect(dbdir = ":memory:")

Arguments

dbdir

Location for database files. Should be a path to an existing directory in the file system or the value ':memory:' to keep data in RAM. Default: ':memory:'

Value

DuckDB connection object of class 'duckdb_connection'

Examples

if (FALSE) { # \dontrun{
if(interactive()){
 connection <- db_connect(dbdir = ":memory:")
 class(connection)
 }
} # }