Learn R Programming

duckspatial (version 0.9.0)

ddbs_create_conn: Create a DuckDB connection with spatial extension

Description

It creates a DuckDB connection, and then it installs and loads the spatial extension

Usage

ddbs_create_conn(dbdir = "memory")

Value

A duckdb_connection

Arguments

dbdir

String. Either "tempdir" or "memory". Defaults to "memory".

Examples

Run this code
if (FALSE) { # interactive()
# load packages
library(duckspatial)

# create a duckdb database in memory (with spatial extension)
conn <- ddbs_create_conn(dbdir = "memory")

# create a duckdb database in disk  (with spatial extension)
conn <- ddbs_create_conn(dbdir = "tempdir")
}

Run the code above in your browser using DataLab