Skip to content

Commit

Permalink
docs: update after constructor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Ed2uiz committed Feb 12, 2024
1 parent e94d445 commit 760bb75
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
4 changes: 3 additions & 1 deletion vignettes/arithmetic.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
12 changes: 7 additions & 5 deletions vignettes/operations.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 760bb75

Please sign in to comment.