Skip to content

Update pkgdown site #698

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,4 @@ _files$
^compile_commands\.json$
^\.cache$
^tests/testthat/helper-rethrow\.R$
^vignettes/articles$
1 change: 1 addition & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,4 @@ Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.2.9000
SystemRequirements: xz (for building from source)
Config/Needs/website: rmarkdown
Binary file modified man/figures/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions _pkgdown.yml → pkgdown/_pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ url: https://r.duckdb.org/

template:
bootstrap: 5
light-switch: true

authors:
Hannes Mühleisen:
Expand Down
86 changes: 86 additions & 0 deletions pkgdown/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# The DuckDB R Package 🦆

DuckDB is an in-process SQL database for R, offering fast data manipulation
through SQL queries without the need for a server or complex setup. It
provides real-time querying, automatic schema inference, and seamless
integration with other R packages for efficient data analysis and visualization.

## Installation from CRAN

``` r
install.packages("duckdb")
```

## Installation from r-universe

``` r
install.packages("duckdb", repos = c("https://duckdb.r-universe.dev", "https://cloud.r-project.org"))
```

## Installation from GitHub

``` r
# install.packages("pak", repos = sprintf("https://r-lib.github.io/p/pak/stable/%s/%s/%s", .Platform$pkgType, R.Version()$os, R.Version()$arch))
pak::pak("duckdb/duckdb-r")
```

## User Guide

See the [R API in the DuckDB documentation](https://duckdb.org/docs/api/r).

## Building

To build the bleeding edge of duckdb-r, you can clone this repository and run

``` sh
~duckdb-r: R CMD INSTALL .
```

If you wish to test new duckdb functionality with duckdb-r, make sure your clones of `duckdb-r` and `duckdb` share the same parent directory.
Then run the following commands

``` sh
~ (cd duckdb && git checkout {{desired_branch}})
~ (cd ducdkb-r && ./vendor-one.sh)
~ (cd duckdb-r && R CMD INSTALL .)
```

It helps if both the duckdb directory and duckdb-r directory are clean.
If you encounter linker errors, merge both duckdb-r and duckdb with their respective main branches.

## Dependencies

To build the R package, you first need to install the dependencies:

``` r
# install.packages("pak", repos = sprintf("https://r-lib.github.io/p/pak/stable/%s/%s/%s", .Platform$pkgType, R.Version()$os, R.Version()$arch))
pak::pak()
```

### Developing with Extensions

If you wish to build or add extensions to the R package you first need to build duckdb with the `extension_static_build` flag.
The following commands allow you to add the [`httpfs` extension](https://duckdb.org/docs/extensions/httpfs) to a DuckDB R build.
See the [extension ReadMe](https://github.com/duckdb/duckdb/tree/master/extension#readme) for more information about extensions

``` sh
cd duckdb/
EXTENSION_STATIC_BUILD=1 make
```

Then in R, run:

``` r
library(duckdb)
con <- DBI::dbConnect(duckdb(config=list('allow_unsigned_extensions'='true')))
dbExecute(con, "LOAD '{{path_to_duckdb}}/build/release/extension/httpfs/httpfs.duckdb_extension'")
```

For more information about using extensions, see the [documentation on extensions](https://duckdb.org/docs/extensions/overview).
For instructions on building them, see [extension README](https://github.com/duckdb/duckdb/tree/main/extension#readme).

## Contributors

Thanks to all [contributors](https://github.com/duckdb/duckdb-r/graphs/contributors) to this repository, and to those who contributed when the code was still hosted in the main [duckdb/duckdb](https://github.com/duckdb/duckdb) repository:

Mark Raasveldt, Pedro Holanda, Tom Ebergen, Reijo Sund, Nicolas Bennett, Patrik Schratz, Tishj, Laurens Kuiper, Sam Ansmink, Andy Teucher, Hadley Wickham, Jonathan Keane, Lindsay Wray, Richard Wesley, Elliana May, Edwin de Jonge, Dewey Dunnington, Carlo Piovesan, Andre Beckedorf, Tania Bogatsch, Pedro Ferreira, Maximilian Girlich, James Lamb, James Atkins, usurai, Ubuntu, Noam Ross, Michael Antonov, Jeroen Ooms, Jamie Lentin, Jacob, and Chilarai.