Install DuckDB/MotherDuck Extensions
install_extensions.RdInstalls valid DuckDB or MotherDuck extensions for the current connection.
Details
The install_extensions() function validates the provided DuckDB/MotherDuck connection,
then checks which of the requested extensions are valid. Valid extensions that are not
already installed are installed using the INSTALL SQL command. Invalid extensions are
reported to the user via CLI messages. This function provides a summary report
describing which extensions were successfully installed and which were invalid.
Unlike load_extensions(), this function focuses purely on installation and does not
automatically load extensions after installing.
Examples
if (FALSE) { # \dontrun{
con <- DBI::dbConnect(duckdb::duckdb())
# Install the 'motherduck' extension
install_extensions(con, "motherduck")
# Install multiple extensions
install_extensions(con, c("fts", "httpfs"))
DBI::dbDisconnect(con)
} # }