| ddbs_create_conn | R Documentation |
It creates a DuckDB connection, and then it installs and loads the spatial extension
ddbs_create_conn(
dbdir = "memory",
threads = NULL,
memory_limit_gb = NULL,
upgrade = FALSE,
...,
duckdb_storage_version = duckspatial_storage_default()
)
dbdir |
String. Either |
threads |
Integer. Number of threads to use. If |
memory_limit_gb |
Numeric. Memory limit in GB. If |
upgrade |
if TRUE, it upgrades the DuckDB extension to the latest version |
... |
Additional parameters to be passed to |
duckdb_storage_version |
Storage compatibility for newly created persistent
native DuckDB files (
Other major version strings like |
A duckdb_connection
## Not run:
# 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")
# create a connection with 1 thread and 2GB memory limit
conn <- ddbs_create_conn(threads = 1, memory_limit_gb = 2)
ddbs_stop_conn(conn)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.