Skip to content

duckspatial

R Interface to 'DuckDB' Database with Spatial Extension

v1.2.1 · Jul 4, 2026 · GPL (>= 3)

Description

Fast and memory-efficient functions to analyze and manipulate large spatial datasets. It leverages the fast analytical capabilities of ‘DuckDB’ and its spatial extension (see <https://duckdb.org/docs/stable/core_extensions/spatial/overview>) while maintaining compatibility with R’s spatial data ecosystem to work with spatial vector data.

Downloads

CRAN

5.9K

Last 30 days

1511th

11.1K

Last 90 days

14.1K

Last year

Trend: +36.2% (30d vs prior 30d)

r2u CRAN

82

Last 30 days

173

Last 90 days

314

Last year

Trend: +60.8% (30d vs prior 30d)

autoCRAN

6

Last 7 days

20

Last 30 days

0

All-time

autoCRAN-only: this name is served only by autoCRAN, so the count is exact.

CRAN Check Status

5 ERROR
8 OK
Show all 13 flavors
Flavor Status
r-devel-linux-x86_64-debian-clang ERROR
r-devel-linux-x86_64-debian-gcc ERROR
r-devel-linux-x86_64-fedora-clang ERROR
r-devel-linux-x86_64-fedora-gcc OK
r-devel-windows-x86_64 OK
r-oldrel-macos-arm64 OK
r-oldrel-macos-x86_64 OK
r-oldrel-windows-x86_64 OK
r-patched-linux-x86_64 ERROR
r-release-linux-x86_64 ERROR
r-release-macos-arm64 OK
r-release-macos-x86_64 OK
r-release-windows-x86_64 OK
Check details (13 non-OK)
ERROR r-devel-linux-x86_64-debian-clang

examples

Running examples in ‘duckspatial-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: ddbs_install
> ### Title: Checks and installs the Spatial extension
> ### Aliases: ddbs_install
> 
> ### ** Examples
> 
> ## load packages
> library(duckspatial)
> library(duckdb)
Loading required package: DBI
> 
> # connect to in memory database
> conn <- duckdb::dbConnect(duckdb::duckdb())
> 
> # install the spatial extension
> ddbs_install(conn)
Error in `ddbs_install()`:
! Failed to install the spatial extension.
ℹ It could not be found in the core or community repositories.
ℹ It might not be available for this version of DuckDB
ℹ Check that the extension name is correct:
  <https://duckdb.org/docs/extensions/overview>
Backtrace:
    ▆
 1. └─duckspatial::ddbs_install(conn)
 2.   └─cli::cli_abort(...)
 3.     └─rlang::abort(...)
Execution halted
ERROR r-devel-linux-x86_64-debian-clang

re-building of vignette outputs

Error(s) in re-building vignettes:
  ...
--- re-building ‘aw_interpolation.qmd’ using html
[31m

processing file: aw_interpolation.qmd
[39m[31mError in `ddbs_install()`:
! Failed to install the spatial extension.
ℹ It could not be found in the core or community reposit[39m[31mories.
ℹ It might not be available for this version of DuckDB
ℹ Check that the extension name is correct:
  <https://duckdb.org/docs/extensions/overview>
Backtrace:
    ▆
 1. └─duckspatial::ddbs_interpolate_aw(...)
 2.   └─duckspatial:::resolve_spatial_connections(...)
 3.     └─duckspatial:::ddbs_default_conn()
 4.       └─duckspatial::ddbs_create_conn(dbdir = "memory", ...)
 5.         └─duckspatial::ddbs_install(conn, upgrade = upgrade, quiet = TRUE)
 6.           └─cli::cli_abort(...)
 7.             └─rlang::abort(...)
[39m[31m
Quitting from aw_interpolation.qmd:68-79 [unnamed-chunk-2]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~[39m[31m~~~~~~~~~~~~~~~~~~
<error/rlang_error>
Error i
...[truncated]...
sion.
  ℹ It could not be found in the core or community repositories.
  ℹ It might not be available for this version of DuckDB
  ℹ Check that the extension name is correct:
  <https://duckdb.org/docs/extensions/overview>
  ---
  Backtrace:
  ▆
  1. └─duckspatial::ddbs_join(x = points_sf, y = countries_sf, join = "within")
  2.  └─duckspatial:::resolve_spatial_connections(...)
  3.  └─duckspatial:::ddbs_default_conn()
  4.  └─duckspatial::ddbs_create_conn(dbdir = "memory", ...)
  5.  └─duckspatial::ddbs_install(conn, upgrade = upgrade, quiet = TRUE)
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  
  Execution halted
  [33mWARN: Error encountered when rendering files[39m
  
Caused by error in `processx::run()`:
! System command 'quarto' failed
--- failed re-building ‘spatial_joins.qmd’

SUMMARY: processing the following files failed:
  ‘aw_interpolation.qmd’ ‘duckspatial.qmd’ ‘spatial_joins.qmd’

Error: Vignette re-building failed.
Execution halted
ERROR r-devel-linux-x86_64-debian-clang

tests

Running ‘testthat.R’ [5s/7s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > # This file is part of the standard setup for testthat.
  > # It is recommended that you do not modify it.
  > #
  > # Where should you do additional test configuration?
  > # Learn more about the roles of various files in:
  > # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
  > # * https://testthat.r-lib.org/articles/special-files.html
  > 
  > library(testthat)
  > library(duckspatial)
  duckspatial 1.1.2 attached
  * Compatible with DuckDB >= v1.5.1
  
  Default output has changed on v1.0.0:
    duckspatial now returns lazy `duckspatial_df` (dbplyr) objects
    instead of `sf` objects.
  
  To restore the previous behaviour:
    ddbs_options(duckspatial.mode = 'sf')
  > library(duckdb)
  Loading required package: DBI
  > 
  > test_check("duckspatial")
  Reading layer `countries' from data source 
    `/home/hornik/tmp/R.check/r-devel-clang/Work/build/Packages/duckspa
...[truncated]...
 env)
    7.             └─testthat::source_dir(path, "^setup.*\\.[rR]$", env = env, wrap = FALSE)
    8.               └─base::lapply(...)
    9.                 └─testthat (local) FUN(X[[i]], ...)
   10.                   └─testthat::source_file(...)
   11.                     ├─base::withCallingHandlers(...)
   12.                     └─base::eval(exprs, env)
   13.                       └─base::eval(exprs, env)
   14.                         ├─duckspatial::as_duckspatial_df(argentina_sf) at ./setup.R:15:1
   15.                         └─duckspatial:::as_duckspatial_df.sf(argentina_sf)
   16.                           └─duckspatial:::ddbs_default_conn()
   17.                             └─duckspatial::ddbs_create_conn(dbdir = "memory", ...)
   18.                               └─duckspatial::ddbs_install(conn, upgrade = upgrade, quiet = TRUE)
   19.                                 └─cli::cli_abort(...)
   20.                                   └─rlang::abort(...)
  Execution halted
ERROR r-devel-linux-x86_64-debian-gcc

re-building of vignette outputs

Error(s) in re-building vignettes:
  ...
--- re-building ‘aw_interpolation.qmd’ using html
[31m

processing file: aw_interpolation.qmd
[39m[31mError in `ddbs_install()`:
! Failed to install the spatial extension.
ℹ It could not be found in the core or community repositories.
ℹ It might not be available for this version of DuckDB
ℹ Check that the extension name is correct:
  <https://duckdb.org/docs/extensions/overview>
Backtrace:
    ▆
 1. └─duckspatial::ddbs_interpolate_aw(...)
 2.   └─duckspatial:::resolve_spatial_connections(...)
 3.     └─duckspatial:::ddbs_default_conn()
 4.       └─duckspatial::ddbs_create_conn(dbdir = "memory", ...)
 5.         └─duckspatial::ddbs_install(conn, upgrade = upgrade, quiet = TRUE)
 6.           └─cli::cli_abort(...)
 7.             └─rlang::abort(...)
[39m[31m
Quitting from aw_interpolation.qmd:78-89 [unnamed-chunk-2]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~[39m[31m~~~~~~~~~~~~~~~~~~
<error/rlang_error>
Error in `ddbs_in
...[truncated]...
sion.
  ℹ It could not be found in the core or community repositories.
  ℹ It might not be available for this version of DuckDB
  ℹ Check that the extension name is correct:
  <https://duckdb.org/docs/extensions/overview>
  ---
  Backtrace:
  ▆
  1. └─duckspatial::ddbs_join(x = points_sf, y = countries_sf, join = "within")
  2.  └─duckspatial:::resolve_spatial_connections(...)
  3.  └─duckspatial:::ddbs_default_conn()
  4.  └─duckspatial::ddbs_create_conn(dbdir = "memory", ...)
  5.  └─duckspatial::ddbs_install(conn, upgrade = upgrade, quiet = TRUE)
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  
  Execution halted
  [33mWARN: Error encountered when rendering files[39m
  
Caused by error in `processx::run()`:
! System command 'quarto' failed
--- failed re-building ‘spatial_joins.qmd’

SUMMARY: processing the following files failed:
  ‘aw_interpolation.qmd’ ‘duckspatial.qmd’ ‘spatial_joins.qmd’

Error: Vignette re-building failed.
Execution halted
ERROR r-devel-linux-x86_64-debian-gcc

tests

Running ‘testthat.R’ [5s/5s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > # This file is part of the standard setup for testthat.
  > # It is recommended that you do not modify it.
  > #
  > # Where should you do additional test configuration?
  > # Learn more about the roles of various files in:
  > # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
  > # * https://testthat.r-lib.org/articles/special-files.html
  > 
  > library(testthat)
  > library(duckspatial)
  duckspatial 1.2.0 attached
  * Compatible with DuckDB >= v1.5.1
  
  Default output has changed on v1.0.0:
    duckspatial now returns lazy `duckspatial_df` (dbplyr) objects
    instead of `sf` objects.
  
  To restore the previous behaviour:
    ddbs_options(mode = 'sf')
  > library(duckdb)
  Loading required package: DBI
  > 
  > test_check("duckspatial")
  Reading layer `countries' from data source 
    `/home/hornik/tmp/R.check/r-devel-gcc/Work/build/Packages/duckspatial/spatial/c
...[truncated]...
 env)
    7.             └─testthat::source_dir(path, "^setup.*\\.[rR]$", env = env, wrap = FALSE)
    8.               └─base::lapply(...)
    9.                 └─testthat (local) FUN(X[[i]], ...)
   10.                   └─testthat::source_file(...)
   11.                     ├─base::withCallingHandlers(...)
   12.                     └─base::eval(exprs, env)
   13.                       └─base::eval(exprs, env)
   14.                         ├─duckspatial::as_duckspatial_df(argentina_sf) at ./setup.R:15:1
   15.                         └─duckspatial:::as_duckspatial_df.sf(argentina_sf)
   16.                           └─duckspatial:::ddbs_default_conn()
   17.                             └─duckspatial::ddbs_create_conn(dbdir = "memory", ...)
   18.                               └─duckspatial::ddbs_install(conn, upgrade = upgrade, quiet = TRUE)
   19.                                 └─cli::cli_abort(...)
   20.                                   └─rlang::abort(...)
  Execution halted
ERROR r-devel-linux-x86_64-fedora-clang

re-building of vignette outputs

Error(s) in re-building vignettes:
--- re-building ‘aw_interpolation.qmd’ using html
[31m

processing file: aw_interpolation.qmd
[39m[31m[gannet:1582919:0:1584263] Caught signal 11 (Segmentation fault: Sent by the kernel at address (nil))
[39m[31m==== backtrace (tid:1584263) ====
 0  /lib64/libucs.so.0(ucs_handle_error+0x2e4) [0x7f98b3ee3df4]
 1  /lib64/libucs.so.0(+0x17aed) [0x7f98b3ee5aed]
 2  /lib64/libucs.so.0(+0x17cbd) [0x7f98b3ee5cbd]
 3  /lib64/libc.so.6(+0x1a040) [0x7f98caa29040]
 4  /data/gannet/ripley/R/test-clang/duckdb/extensions/v1.5.4/linux_amd64/spatial.duckdb_extension(+0x1196b50) [0x7f9788b96b50]
 5  /data/gannet/ripley/R/test-clang/duckdb/extensions/v1.5.4/linux_amd64/spatial.duckdb_extension(+0x1168728) [0x7f9788b68728]
 6  /data/gannet/ripley/R/test-clang/duckdb/extensions/v1.5.4/linux_amd64/spatial.duckdb_extension(+0x773544) [0x7f9788173544]
 7  /data/gannet/ripley/R/test-clang/duckdb/extensions/v1.5.4/linux_amd64/spatial.duckdb_extension(+0x7718d9) [0x7f9788
...[truncated]...
 output_format = output_format,     knit_root_dir = knit_root_dir, params = params, run_pandoc = FALSE,     envir = env)
53: execute(params$input, params$format, params$tempDir, params$libDir,     params$dependencies, params$cwd, params$params, params$resourceDir,     params$handledLanguages, params$markdown)
54: .main()
An irrecoverable exception occurred. R is aborting now ...
[39m[33mWARN: Error encountered when rendering files[39m
Error: processing vignette 'spatial_joins.qmd' failed with diagnostics:
! Error running quarto CLI from R.
Caused by error:
! Could not parse cli `{}` expression: ` { .__han…`.
Caused by error:
! <text>:1:49: unexpected symbol
1:     {        .__handler_frame__. <- TRUE        .__setup_frame__.
                                                    ^
--- failed re-building ‘spatial_joins.qmd’

SUMMARY: processing the following files failed:
  ‘aw_interpolation.qmd’ ‘duckspatial.qmd’ ‘spatial_joins.qmd’

Error: Vignette re-building failed.
Execution halted
ERROR r-devel-linux-x86_64-fedora-clang

tests

Running ‘testthat.R’
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > # This file is part of the standard setup for testthat.
  > # It is recommended that you do not modify it.
  > #
  > # Where should you do additional test configuration?
  > # Learn more about the roles of various files in:
  > # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
  > # * https://testthat.r-lib.org/articles/special-files.html
  > 
  > library(testthat)
  > library(duckspatial)
  duckspatial 1.2.0 attached
  * Compatible with DuckDB >= v1.5.1
  
  Default output has changed on v1.0.0:
    duckspatial now returns lazy `duckspatial_df` (dbplyr) objects
    instead of `sf` objects.
  
  To restore the previous behaviour:
    ddbs_options(mode = 'sf')
  > library(duckdb)
  Loading required package: DBI
  > 
  > test_check("duckspatial")
  Reading layer `countries' from data source 
    `/data/gannet/ripley/R/packages/tests-clang/duckspatial.Rcheck/duckspatial/spatial/coun
...[truncated]...
                           │ ├─base::tryCatch(...)
   33. │                                             │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers)
   34. │                                             │ │   └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
   35. │                                             │ │     └─base (local) doTryCatch(return(expr), name, parentenv, handler)
   36. │                                             │ └─base::withCallingHandlers(...)
   37. │                                             └─duckdb:::rapi_execute(stmt, convert_opts)
   38. ├─duckdb (local) `<fn>`(...)
   39. │ └─rlang::abort(error_parts, class = "duckdb_error", !!!fields)
   40. │   └─rlang:::signal_abort(cnd, .file)
   41. │     └─base::signalCondition(cnd)
   42. └─rlang (local) `<fn>`(`<dckdb_rr>`)
   43.   └─handlers[[1L]](cnd)
   44.     └─duckdb:::rethrow_error_from_rapi(e, call)
   45.       └─rlang::abort(msg, call = call)
  Execution halted
ERROR r-patched-linux-x86_64

examples

Running examples in ‘duckspatial-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: ddbs_install
> ### Title: Checks and installs the Spatial extension
> ### Aliases: ddbs_install
> 
> ### ** Examples
> 
> ## load packages
> library(duckspatial)
> library(duckdb)
Loading required package: DBI
> 
> # connect to in memory database
> conn <- duckdb::dbConnect(duckdb::duckdb())
> 
> # install the spatial extension
> ddbs_install(conn)
Error in `ddbs_install()`:
! Failed to install the spatial extension.
ℹ It could not be found in the core or community repositories.
ℹ It might not be available for this version of DuckDB
ℹ Check that the extension name is correct:
  <https://duckdb.org/docs/extensions/overview>
Backtrace:
    ▆
 1. └─duckspatial::ddbs_install(conn)
 2.   └─cli::cli_abort(...)
 3.     └─rlang::abort(...)
Execution halted
ERROR r-patched-linux-x86_64

re-building of vignette outputs

Error(s) in re-building vignettes:
  ...
--- re-building ‘aw_interpolation.qmd’ using html
[31m

processing file: aw_interpolation.qmd
[39m[31mError in `ddbs_install()`:
! Failed to install the spatial extension.
ℹ It could not be found in the core or community reposit[39m[31mories.
ℹ It might not be available for this version of DuckDB
ℹ Check that the extension name is correct:
  <https://duckdb.org/docs/extensions/overview>
Backtrace:
    ▆
 1. └─duckspatial::ddbs_interpolate_aw(...)
 2.   └─duckspatial:::resolve_spatial_connections(...)
 3.     └─duckspatial:::ddbs_default_conn()
 4.       └─duckspatial::ddbs_create_conn(dbdir = "memory", ...)
 5.         └─duckspatial::ddbs_install(conn, upgrade = upgrade, quiet = TRUE)
 6.           └─cli::cli_abort(...)
 7.             └─rlang::abort(...)
[39m[31m
Quitting from aw_interpolation.qmd:68-79 [unnamed-chunk-2]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~[39m[31m~~~~~~~~~~~~~~~~~~
<error/rlang_error>
Error i
...[truncated]...
sion.
  ℹ It could not be found in the core or community repositories.
  ℹ It might not be available for this version of DuckDB
  ℹ Check that the extension name is correct:
  <https://duckdb.org/docs/extensions/overview>
  ---
  Backtrace:
  ▆
  1. └─duckspatial::ddbs_join(x = points_sf, y = countries_sf, join = "within")
  2.  └─duckspatial:::resolve_spatial_connections(...)
  3.  └─duckspatial:::ddbs_default_conn()
  4.  └─duckspatial::ddbs_create_conn(dbdir = "memory", ...)
  5.  └─duckspatial::ddbs_install(conn, upgrade = upgrade, quiet = TRUE)
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  
  Execution halted
  [33mWARN: Error encountered when rendering files[39m
  
Caused by error in `processx::run()`:
! System command 'quarto' failed
--- failed re-building ‘spatial_joins.qmd’

SUMMARY: processing the following files failed:
  ‘aw_interpolation.qmd’ ‘duckspatial.qmd’ ‘spatial_joins.qmd’

Error: Vignette re-building failed.
Execution halted
ERROR r-patched-linux-x86_64

tests

Running ‘testthat.R’ [4s/6s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > # This file is part of the standard setup for testthat.
  > # It is recommended that you do not modify it.
  > #
  > # Where should you do additional test configuration?
  > # Learn more about the roles of various files in:
  > # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
  > # * https://testthat.r-lib.org/articles/special-files.html
  > 
  > library(testthat)
  > library(duckspatial)
  duckspatial 1.1.2 attached
  * Compatible with DuckDB >= v1.5.1
  
  Default output has changed on v1.0.0:
    duckspatial now returns lazy `duckspatial_df` (dbplyr) objects
    instead of `sf` objects.
  
  To restore the previous behaviour:
    ddbs_options(duckspatial.mode = 'sf')
  > library(duckdb)
  Loading required package: DBI
  > 
  > test_check("duckspatial")
  Reading layer `countries' from data source 
    `/home/hornik/tmp/R.check/r-patched-gcc/Work/build/Packages/duckspa
...[truncated]...
 env)
    7.             └─testthat::source_dir(path, "^setup.*\\.[rR]$", env = env, wrap = FALSE)
    8.               └─base::lapply(...)
    9.                 └─testthat (local) FUN(X[[i]], ...)
   10.                   └─testthat::source_file(...)
   11.                     ├─base::withCallingHandlers(...)
   12.                     └─base::eval(exprs, env)
   13.                       └─base::eval(exprs, env)
   14.                         ├─duckspatial::as_duckspatial_df(argentina_sf) at ./setup.R:15:1
   15.                         └─duckspatial:::as_duckspatial_df.sf(argentina_sf)
   16.                           └─duckspatial:::ddbs_default_conn()
   17.                             └─duckspatial::ddbs_create_conn(dbdir = "memory", ...)
   18.                               └─duckspatial::ddbs_install(conn, upgrade = upgrade, quiet = TRUE)
   19.                                 └─cli::cli_abort(...)
   20.                                   └─rlang::abort(...)
  Execution halted
ERROR r-release-linux-x86_64

examples

Running examples in ‘duckspatial-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: ddbs_install
> ### Title: Checks and installs the Spatial extension
> ### Aliases: ddbs_install
> 
> ### ** Examples
> 
> ## load packages
> library(duckspatial)
> library(duckdb)
Loading required package: DBI
> 
> # connect to in memory database
> conn <- duckdb::dbConnect(duckdb::duckdb())
> 
> # install the spatial extension
> ddbs_install(conn)
Error in `ddbs_install()`:
! Failed to install the spatial extension.
ℹ It could not be found in the core or community repositories.
ℹ It might not be available for this version of DuckDB
ℹ Check that the extension name is correct:
  <https://duckdb.org/docs/extensions/overview>
Backtrace:
    ▆
 1. └─duckspatial::ddbs_install(conn)
 2.   └─cli::cli_abort(...)
 3.     └─rlang::abort(...)
Execution halted
ERROR r-release-linux-x86_64

re-building of vignette outputs

Error(s) in re-building vignettes:
  ...
--- re-building ‘aw_interpolation.qmd’ using html
[31m

processing file: aw_interpolation.qmd
[39m[31mError in `ddbs_install()`:
! Failed to install the spatial extension.
ℹ It could not be found in the core or community repositories.
ℹ It might not be available for this version of DuckDB
ℹ Check that the extension name is correct:
  <https://duckdb.org/docs/extensions/overview>
Backtrace:
    ▆
 1. └─duckspatial::ddbs_interpolate_aw(...)
 2.   └─duckspatial:::resolve_spatial_connections(...)
 3.     └─duckspatial:::ddbs_default_conn()
 4.       └─duckspatial::ddbs_create_conn(dbdir = "memory", ...)
 5.         └─duckspatial::ddbs_install(conn, upgrade = upgrade, quiet = TRUE)
 6.           └─cli::cli_abort(...)
 7.             └─rlang::abort(...)
[39m[31m
Quitting from aw_interpolation.qmd:68-79 [unnamed-chunk-2]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~[39m[31m~~~~~~~~~~~~~~~~~~
<error/rlang_error>
Error in `ddbs_in
...[truncated]...
sion.
  ℹ It could not be found in the core or community repositories.
  ℹ It might not be available for this version of DuckDB
  ℹ Check that the extension name is correct:
  <https://duckdb.org/docs/extensions/overview>
  ---
  Backtrace:
  ▆
  1. └─duckspatial::ddbs_join(x = points_sf, y = countries_sf, join = "within")
  2.  └─duckspatial:::resolve_spatial_connections(...)
  3.  └─duckspatial:::ddbs_default_conn()
  4.  └─duckspatial::ddbs_create_conn(dbdir = "memory", ...)
  5.  └─duckspatial::ddbs_install(conn, upgrade = upgrade, quiet = TRUE)
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  
  Execution halted
  [33mWARN: Error encountered when rendering files[39m
  
Caused by error in `processx::run()`:
! System command 'quarto' failed
--- failed re-building ‘spatial_joins.qmd’

SUMMARY: processing the following files failed:
  ‘aw_interpolation.qmd’ ‘duckspatial.qmd’ ‘spatial_joins.qmd’

Error: Vignette re-building failed.
Execution halted
ERROR r-release-linux-x86_64

tests

Running ‘testthat.R’ [5s/7s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > # This file is part of the standard setup for testthat.
  > # It is recommended that you do not modify it.
  > #
  > # Where should you do additional test configuration?
  > # Learn more about the roles of various files in:
  > # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
  > # * https://testthat.r-lib.org/articles/special-files.html
  > 
  > library(testthat)
  > library(duckspatial)
  duckspatial 1.1.2 attached
  * Compatible with DuckDB >= v1.5.1
  
  Default output has changed on v1.0.0:
    duckspatial now returns lazy `duckspatial_df` (dbplyr) objects
    instead of `sf` objects.
  
  To restore the previous behaviour:
    ddbs_options(duckspatial.mode = 'sf')
  > library(duckdb)
  Loading required package: DBI
  > 
  > test_check("duckspatial")
  Reading layer `countries' from data source 
    `/home/hornik/tmp/R.check/r-release-gcc/Work/build/Packages/duckspa
...[truncated]...
 env)
    7.             └─testthat::source_dir(path, "^setup.*\\.[rR]$", env = env, wrap = FALSE)
    8.               └─base::lapply(...)
    9.                 └─testthat (local) FUN(X[[i]], ...)
   10.                   └─testthat::source_file(...)
   11.                     ├─base::withCallingHandlers(...)
   12.                     └─base::eval(exprs, env)
   13.                       └─base::eval(exprs, env)
   14.                         ├─duckspatial::as_duckspatial_df(argentina_sf) at ./setup.R:15:1
   15.                         └─duckspatial:::as_duckspatial_df.sf(argentina_sf)
   16.                           └─duckspatial:::ddbs_default_conn()
   17.                             └─duckspatial::ddbs_create_conn(dbdir = "memory", ...)
   18.                               └─duckspatial::ddbs_install(conn, upgrade = upgrade, quiet = TRUE)
   19.                                 └─cli::cli_abort(...)
   20.                                   └─rlang::abort(...)
  Execution halted

Check History

ERROR 13 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Mar 10, 2026
ERROR r-devel-linux-x86_64-fedora-clang

tests

Running ‘testthat.R’ [10s/25s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > # This file is part of the standard setup for testthat.
  > # It is recommended that you do not modify it.
  > #
  > # Where should you do additional 
...[truncated]...
load_package, parallel = parallel, shuffle = shuffle)
  55: test_dir("testthat", package = package, reporter = reporter,     ..., load_package = "installed")
  56: test_check("duckspatial")
  An irrecoverable exception occurred. R is aborting now ...

Code

Structure

Lines of code

47,270

Files

293

Compiled share

0%

Has compiled src

No

Language breakdown

R 19,054 (40.3%)Tests 17,533 (37.1%)Docs 9,424 (19.9%)Vignettes 1,259 (2.7%)

API

Exported functions

147

Internal functions

159

Recent export changes

v1.2.0+14 ddbs_as_mvt_geom, ddbs_extension_info, ddbs_geom_from_geojson +11 more
v1.1.2+14 ddbs_azimuth, ddbs_dimension, ddbs_line_locate_point +11 more

Testing & CI

Has tests

Yes

Test-to-code ratio

0.92

testthat edition

3

CI present

No

CI type

[]

PR gated

No

Docs

Return-value doc rate

100%

\dontrun example ratio

95.3%

Roxygen coverage

100%

Has pkgdown

No

NEWS present

Yes

Health & Security signals

Informational signals; not verdicts.

on.exit coverage

14.3%

Unsafe pattern score

0

Dep constraint coverage

10.5%

Secret pattern count

0

Bundled 3rd-party code

2 items

Portability & License

Min R version

4.1.0

System requirements

C++ standard

License

GPL (>= 3)

License flags

SPDX valid, OSI approved

History

Versions

8

First release

2025-04-19

Latest release

2026-07-02

Avg cadence

20 days

Cold removal rate

100%

Dep drift

15

LOC over versions

v0.1.0: 1,222 LOCv0.2.0: 2,002 LOCv0.9.0: 16,651 LOCv1.0.0: 31,286 LOCv1.1.0: 35,840 LOCv1.1.1: 40,513 LOCv1.1.2: 43,612 LOCv1.2.0: 47,270 LOC

Per-file churn detail lives in the source pipeline: https://github.com/r-observatory/cran-code-metrics.

Reverse Dependencies (4)

Dependency Network

Dependencies Reverse dependencies arrow cli DBI dbplyr dplyr duckdb (>= 1.5.4.2) geoarrow glue jsonlite lifecycle nanoarrow rlang sf tibble units +3 more dependencies cnefetools duckh3 geobr geocodebr duckspatial

Version History

10 tracked
updated 1.2.1 ← 1.2.0 diff Jul 4, 2026
updated 1.2.0 ← 1.1.2 diff Jul 2, 2026
updated 1.1.2 ← 1.1.1 diff Jun 22, 2026
updated 1.1.1 ← 1.1.0 diff Jun 6, 2026
updated 1.1.0 ← 1.0.0 diff May 17, 2026
updated 1.0.0 ← 0.9.0 diff Mar 30, 2026
new 0.9.0 Mar 10, 2026
updated 0.9.0 ← 0.2.0 diff Jan 9, 2026
updated 0.2.0 ← 0.1.0 diff Apr 28, 2025
new 0.1.0 Apr 18, 2025