tables <- unique(data(package = "datasets")$results[, 3])
tables <- tables[!grepl("(", tables, fixed = TRUE)]
con <- dbConnect(SQLite(), "inst/db/datasets.sqlite")
for (table in tables) {
df <- getExportedValue("datasets", table)
if (!is.data.frame(df)) next
message("Creating table: ", table)
dbWriteTable(con, table, as.data.frame(df), overwrite = TRUE)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.