| ext_install | R Documentation |
Tries two strategies in order, succeeding as soon as one works:
ext_install(
name,
cache = ext_cache(),
repo = c("core", "community"),
conn = conn_default(),
verbose = NULL
)
name |
Character scalar. Extension name. |
cache |
An |
repo |
|
conn |
A DuckDB connection. Defaults to |
verbose |
Logical or |
SQL install: runs DuckDB's built-in INSTALL (using the configured
repository URL when one is set via repo_set_urls(), the
QUAK_CORE_REPO / QUAK_COMMUNITY_REPO env vars, or the
quak.core_repo / quak.community_repo R options).
Manual fallback: when the SQL install fails (e.g. DuckDB cannot
reach an HTTPS URL before httpfs is loaded, whereas R's curl can),
downloads the .duckdb_extension file, caches it, and copies it into
the extension directory.
A SQL failure is never raised on its own — it only surfaces (as a warning,
when verbose = TRUE) if the manual fallback also runs. An error is raised
only when both strategies fail.
Idempotent — skips install if the extension is already installed
(checked via the duckdb_extensions() pragma).
Invisibly returns conn.
## Not run:
# Requires network access to download the extension.
conn <- DBI::dbConnect(duckdb::duckdb())
ext_install("httpfs", conn = conn)
DBI::dbDisconnect(conn, shutdown = TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.