inst/rstudio/connections/DuckDB.R

library(DBI)
library(duckdb)

# create / connect to database file
drv <- duckdb(dbdir = "${1:database=quack.db}")
con <- dbConnect(drv)

## write a table to it
# dbWriteTable(con, "iris", iris)

## and disconnect
# dbDisconnect(con, shutdown=TRUE)

Try the duckdb package in your browser

Any scripts or data that you put into this service are public.

duckdb documentation built on Oct. 30, 2024, 5:06 p.m.