From 760bb75a271aace0bb04826ef7acede7f2c67723 Mon Sep 17 00:00:00 2001 From: Eddie Ruiz <32622519+Ed2uiz@users.noreply.github.com> Date: Mon, 12 Feb 2024 11:21:39 -0500 Subject: [PATCH] docs: update after constructor fix --- vignettes/arithmetic.Rmd | 4 +++- vignettes/operations.Rmd | 12 +++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/vignettes/arithmetic.Rmd b/vignettes/arithmetic.Rmd index 95df38e..126ea26 100644 --- a/vignettes/arithmetic.Rmd +++ b/vignettes/arithmetic.Rmd @@ -37,8 +37,10 @@ The file contains 634 rows and 624 columns. The rows represent gene names and th Let's create a `dbSparseMatrix` object from the above `dgc` object. ```{r} # Note: by default the constructor creates a dbMatrix object in-memory +con <- DBI::dbConnect(duckdb::duckdb(), ":memory:") + dbsm <- createDBMatrix(value = dgc, - db_path = ":memory:", + con = con, name = 'visium', class = "dbSparseMatrix", overwrite = TRUE) diff --git a/vignettes/operations.Rmd b/vignettes/operations.Rmd index dc65ade..f81dfa9 100644 --- a/vignettes/operations.Rmd +++ b/vignettes/operations.Rmd @@ -61,11 +61,13 @@ dplyr::glimpse(dgc) ```{r} # create dbSparseMatrix from the same dgc -sparse = createDBMatrix(value = dgc, - db_path = ":memory:", - name = "sparse", - class = "dbSparseMatrix", - overwrite = TRUE) +con <- DBI::dbConnect(duckdb::duckdb(), ":memory:") + +sparse <- createDBMatrix(value = dgc, + con = con, + name = 'visium', + class = "dbSparseMatrix", + overwrite = TRUE) # preview # show function aims to emulate the show method for dgCMatrix