| ddbh3_create_conn | R Documentation |
It creates a DuckDB connection, and then it installs and loads the spatial and h3 extensions
ddbh3_create_conn(
dbdir = "memory",
threads = NULL,
memory_limit_gb = NULL,
bigint = "integer64",
...
)
dbdir |
String. Either "tempdir", "memory", or file path with .duckdb or .db extension. Defaults to "memory". |
threads |
Integer. Number of threads to use. If |
memory_limit_gb |
Numeric. Memory limit in GB. If |
bigint |
String. How to handle 64-bit integers. One of "integer64" or "numeric" |
... |
Other parameters passed to |
A duckdb_connection
# load packages
library(duckspatial)
library(duckh3)
# create a duckdb database in memory
conn <- ddbh3_create_conn(dbdir = "memory", threads = 1)
# create an in-memory connection with 1 thread and 2GB memory limit
conn <- ddbh3_create_conn(threads = 1, memory_limit_gb = 2)
# Create a persistent database in disk
# conn <- ddbh3_create_conn(dbdir = "my_database.duckdb")
ddbs_stop_conn(conn)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.