From a9293c39ddbc9b511bc5ddc2dd3a137573323811 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rasmus=20Skytte=20Randl=C3=B8v?= Date: Fri, 4 Oct 2024 11:07:31 +0200 Subject: [PATCH] fix(basic-principles): run `get_connection()` only once --- vignettes/SCDB.Rmd | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/vignettes/SCDB.Rmd b/vignettes/SCDB.Rmd index 1b2d0dbc..889f5b8d 100644 --- a/vignettes/SCDB.Rmd +++ b/vignettes/SCDB.Rmd @@ -62,9 +62,10 @@ See also the [PostgreSQL documentation](https://www.postgresql.org/docs/current/ ] Our example data is `datasets::mtcars` reduced to only two columns: row names converted to a column `car`, and `hp` -```{r example_data, eval = requireNamespace("RSQLite", quietly = TRUE)} +```{r example_data, eval = FALSE} conn <- get_connection() - +``` +```{r example_data_hidden, eval = requireNamespace("RSQLite", quietly = TRUE)} example_data <- dplyr::tbl(conn, DBI::Id(table = "example_data")) example_data ```