Skip to content

duckh3

H3 Extension of 'DuckDB'

v0.1.0 · Apr 24, 2026 · GPL (>= 3)

Description

Fast & memory-efficient functions to analyze and manipulate large data sets. It leverages the fast analytical capabilities of 'DuckDB' and its spatial extension (see <https://duckdb.org/community_extensions/extensions/h3>) while maintaining compatibility with R’s spatial data ecosystem to work with spatial vector data.

Downloads

CRAN

461

Last 30 days

8433rd

1.2K

Last 90 days

1.2K

Last year

Trend: -6.7% (30d vs prior 30d)

r2u CRAN

0

Last 30 days

15

Last 90 days

15

Last year

Trend: -100% (30d vs prior 30d)

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 (10 non-OK)
ERROR r-devel-linux-x86_64-debian-clang

examples

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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: ddbh3_get_child_pos
> ### Title: Get the position of an H3 cell within its parent
> ### Aliases: ddbh3_get_child_pos
> 
> ### ** Examples
> 
> ## Load needed packages
> library(duckh3)
> library(dplyr)

Attaching package: ‘dplyr’

The following objects are masked from ‘package:stats’:

    filter, lag

The following objects are masked from ‘package:base’:

    intersect, setdiff, setequal, union

> 
> ## Setup the default connection with h3 and spatial extensions
> ## This is a mandatory step to use duckh3 functions
> ddbh3_default_conn(threads = 1)
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. └─duckh3::ddbh3_default_conn(threads = 1)
 2.   └─duckspatial::ddbs_create_conn(...)
 3.     └─duckspatial::ddbs_install(conn, upgrade = upgrade, quiet = TRUE)
 4.       └─cli::cli_abort(...)
 5.         └─rlang::abort(...)
Execution halted
ERROR r-devel-linux-x86_64-debian-clang

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(duckh3)
  > 
  > test_check("duckh3")
  Error in `source_dir()`:
  ! Failed to evaluate './setup.R'.
  Caused by 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. └─testthat::test_check("duckh3")
    2.   └─testthat::test_dir(...)
    3.     └─testthat:::test_files(...)
    4.       └─testthat:::test_files_serial(...)
    5.         └─testthat:::test_files_setup_state(...)
    6.           └─testthat::source_test_setup(".", 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.                         └─duckh3::ddbh3_default_conn() at ./setup.R:12:1
   15.                           └─duckspatial::ddbs_create_conn(...)
   16.                             └─duckspatial::ddbs_install(conn, upgrade = upgrade, quiet = TRUE)
   17.                               └─cli::cli_abort(...)
   18.                                 └─rlang::abort(...)
  Execution halted
ERROR r-devel-linux-x86_64-debian-gcc

examples

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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: ddbh3_get_child_pos
> ### Title: Get the position of an H3 cell within its parent
> ### Aliases: ddbh3_get_child_pos
> 
> ### ** Examples
> 
> ## Load needed packages
> library(duckh3)
> library(dplyr)

Attaching package: ‘dplyr’

The following objects are masked from ‘package:stats’:

    filter, lag

The following objects are masked from ‘package:base’:

    intersect, setdiff, setequal, union

> 
> ## Setup the default connection with h3 and spatial extensions
> ## This is a mandatory step to use duckh3 functions
> ddbh3_default_conn(threads = 1)
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. └─duckh3::ddbh3_default_conn(threads = 1)
 2.   └─duckspatial::ddbs_create_conn(...)
 3.     └─duckspatial::ddbs_install(conn, upgrade = upgrade, quiet = TRUE)
 4.       └─cli::cli_abort(...)
 5.         └─rlang::abort(...)
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(duckh3)
  > 
  > test_check("duckh3")
  Error in `source_dir()`:
  ! Failed to evaluate './setup.R'.
  Caused by 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. └─testthat::test_check("duckh3")
    2.   └─testthat::test_dir(...)
    3.     └─testthat:::test_files(...)
    4.       └─testthat:::test_files_serial(...)
    5.         └─testthat:::test_files_setup_state(...)
    6.           └─testthat::source_test_setup(".", 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.                         └─duckh3::ddbh3_default_conn() at ./setup.R:12:1
   15.                           └─duckspatial::ddbs_create_conn(...)
   16.                             └─duckspatial::ddbs_install(conn, upgrade = upgrade, quiet = TRUE)
   17.                               └─cli::cli_abort(...)
   18.                                 └─rlang::abort(...)
  Execution halted
ERROR r-devel-linux-x86_64-fedora-clang

examples

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

> ### Name: ddbh3_get_child_pos
> ### Title: Get the position of an H3 cell within its parent
> ### Aliases: ddbh3_get_child_pos
> 
> ### ** Examples
> 
> ## Load needed packages
> library(duckh3)
> library(dplyr)

Attaching package: ‘dplyr’

The following objects are masked from ‘package:stats’:

    filter, lag

The following objects are masked from ‘package:base’:

    intersect, setdiff, setequal, union

> 
> ## Setup the default connection with h3 and spatial extensions
> ## This is a mandatory step to use duckh3 functions
> ddbh3_default_conn(threads = 1)
[gannet:1549351:0:1550003] Caught signal 11 (Segmentation fault: address not mapped to object at address 0x50300000f)
==== backtrace (tid:1550003) ====
 0  /lib64/libucs.so.0(ucs_handle_error+0x2e4) [0x7fc3ca9e4df4]
 1  /lib64/libucs.so.0(+0x17aed) [0x7fc3ca9e6aed]
 2  /lib64/libucs.so.0(+0x17cbd) [0x7fc3ca9e6cbd]
 3  /lib64/libc.so.6(+0x1a040) [0x7fc3e
...[truncated]...
t_opts), error = function(e) {    rethrow_error_from_rapi(e, call)})
 8: rethrow_rapi_execute(res@stmt_lst$ref, duckdb_convert_opts_impl(res@connection@convert_opts,     arrow = res@arrow))
 9: duckdb_execute(res)
10: duckdb_result(connection = conn, stmt_lst = stmt_lst, arrow = arrow)
11: .local(conn, statement, ...)
12: dbSendQuery(conn, statement, ...)
13: dbSendQuery(conn, statement, ...)
14: dbSendStatement(conn, statement, ...)
15: dbSendStatement(conn, statement, ...)
16: DBI::dbExecute(conn, glue::glue("LOAD {extension};"))
17: DBI::dbExecute(conn, glue::glue("LOAD {extension};"))
18: withCallingHandlers(expr, message = function(c) if (inherits(c,     classes)) tryInvokeRestart("muffleMessage"))
19: suppressMessages(DBI::dbExecute(conn, glue::glue("LOAD {extension};")))
20: ddbs_load(conn, quiet = TRUE)
21: duckspatial::ddbs_create_conn(dbdir = "memory", bigint = "integer64",     ...)
22: ddbh3_default_conn(threads = 1)
An irrecoverable exception occurred. R is aborting now ...
ERROR r-devel-linux-x86_64-fedora-clang

tests

Running ‘testthat.R’ [6s/17s]
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(duckh3)
  > 
  > test_check("duckh3")
  [gannet:1553070:0:1553070] Caught signal 11 (Segmentation fault: address not mapped to object at address 0x449)
  ==== backtrace (tid:1553070) ====
   0  /lib64/libucs.so.0(ucs_handle_error+0x2e4) [0x7ff9551e4df4]
   1  /lib64/libucs.so.0(+0x17aed) [0x7ff9551e6aed]
   2  /lib64/libucs.so.0(+0x17cbd) [0x7ff9551e6cbd]
   3  /lib64/libc.so.6(+0x1a040) [0x7ff96e328040]
   4  /data/gannet/ripley/R/test-clang/duckdb/extensions/v1.5.4/linux_amd64/spatial.duckdb_exte
...[truncated]...
)})
  29: source_dir(path, "^setup.*\\.[rR]$", env = env, wrap = FALSE)
  30: source_test_setup(".", env)
  31: test_files_setup_state(test_dir, test_package, load_helpers,     env)
  32: test_files_serial(test_dir = test_dir, test_package = test_package,     test_paths = test_paths, load_helpers = load_helpers, reporter = reporter,     env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,     desc = desc, load_package = load_package, shuffle = shuffle,     error_call = error_call)
  33: test_files(test_dir = path, test_paths = test_paths, test_package = package,     reporter = reporter, load_helpers = load_helpers, env = env,     stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,     load_package = load_package, parallel = parallel, shuffle = shuffle)
  34: test_dir("testthat", package = package, reporter = reporter,     ..., load_package = "installed")
  35: test_check("duckh3")
  An irrecoverable exception occurred. R is aborting now ...
ERROR r-patched-linux-x86_64

examples

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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: ddbh3_get_child_pos
> ### Title: Get the position of an H3 cell within its parent
> ### Aliases: ddbh3_get_child_pos
> 
> ### ** Examples
> 
> ## Load needed packages
> library(duckh3)
> library(dplyr)

Attaching package: ‘dplyr’

The following objects are masked from ‘package:stats’:

    filter, lag

The following objects are masked from ‘package:base’:

    intersect, setdiff, setequal, union

> 
> ## Setup the default connection with h3 and spatial extensions
> ## This is a mandatory step to use duckh3 functions
> ddbh3_default_conn(threads = 1)
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. └─duckh3::ddbh3_default_conn(threads = 1)
 2.   └─duckspatial::ddbs_create_conn(...)
 3.     └─duckspatial::ddbs_install(conn, upgrade = upgrade, quiet = TRUE)
 4.       └─cli::cli_abort(...)
 5.         └─rlang::abort(...)
Execution halted
ERROR r-patched-linux-x86_64

tests

Running ‘testthat.R’ [6s/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(duckh3)
  > 
  > test_check("duckh3")
  Error in `source_dir()`:
  ! Failed to evaluate './setup.R'.
  Caused by 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. └─testthat::test_check("duckh3")
    2.   └─testthat::test_dir(...)
    3.     └─testthat:::test_files(...)
    4.       └─testthat:::test_files_serial(...)
    5.         └─testthat:::test_files_setup_state(...)
    6.           └─testthat::source_test_setup(".", 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.                         └─duckh3::ddbh3_default_conn() at ./setup.R:12:1
   15.                           └─duckspatial::ddbs_create_conn(...)
   16.                             └─duckspatial::ddbs_install(conn, upgrade = upgrade, quiet = TRUE)
   17.                               └─cli::cli_abort(...)
   18.                                 └─rlang::abort(...)
  Execution halted
ERROR r-release-linux-x86_64

examples

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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: ddbh3_get_child_pos
> ### Title: Get the position of an H3 cell within its parent
> ### Aliases: ddbh3_get_child_pos
> 
> ### ** Examples
> 
> ## Load needed packages
> library(duckh3)
> library(dplyr)

Attaching package: ‘dplyr’

The following objects are masked from ‘package:stats’:

    filter, lag

The following objects are masked from ‘package:base’:

    intersect, setdiff, setequal, union

> 
> ## Setup the default connection with h3 and spatial extensions
> ## This is a mandatory step to use duckh3 functions
> ddbh3_default_conn(threads = 1)
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. └─duckh3::ddbh3_default_conn(threads = 1)
 2.   └─duckspatial::ddbs_create_conn(...)
 3.     └─duckspatial::ddbs_install(conn, upgrade = upgrade, quiet = TRUE)
 4.       └─cli::cli_abort(...)
 5.         └─rlang::abort(...)
Execution halted
ERROR r-release-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(duckh3)
  > 
  > test_check("duckh3")
  Error in `source_dir()`:
  ! Failed to evaluate './setup.R'.
  Caused by 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. └─testthat::test_check("duckh3")
    2.   └─testthat::test_dir(...)
    3.     └─testthat:::test_files(...)
    4.       └─testthat:::test_files_serial(...)
    5.         └─testthat:::test_files_setup_state(...)
    6.           └─testthat::source_test_setup(".", 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.                         └─duckh3::ddbh3_default_conn() at ./setup.R:12:1
   15.                           └─duckspatial::ddbs_create_conn(...)
   16.                             └─duckspatial::ddbs_install(conn, upgrade = upgrade, quiet = TRUE)
   17.                               └─cli::cli_abort(...)
   18.                                 └─rlang::abort(...)
  Execution halted

Check History

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

examples

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

> ### Name: ddbh3_get_child_pos
> ### Title: Get the position of an H3 cell within its parent
> ### Aliases: ddbh3_get_child_pos
> 
> ### ** Examples
> 
> ## Load needed pac
...[truncated]...
onn, glue::glue("LOAD {extension};")))
20: ddbs_load(conn, quiet = TRUE)
21: duckspatial::ddbs_create_conn(dbdir = "memory", bigint = "integer64",     ...)
22: ddbh3_default_conn(threads = 1)
An irrecoverable exception occurred. R is aborting now ...
OK 5 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Apr 25, 2026

Code

Structure

Lines of code

9,890

Files

54

Compiled share

0%

Has compiled src

No

Language breakdown

R 2,358 (23.8%)Tests 6,067 (61.3%)Docs 1,465 (14.8%)

API

Exported functions

28

Internal functions

6

Recent export changes

v0.1.0+28 ddbh3_bigint_to_strings, ddbh3_create_conn, ddbh3_default_conn +25 more

Testing & CI

Has tests

Yes

Test-to-code ratio

2.57

testthat edition

3

CI present

No

CI type

[]

PR gated

No

Docs

Return-value doc rate

100%

\dontrun example ratio

18.2%

Roxygen coverage

100%

Has pkgdown

No

NEWS present

Yes

Health & Security signals

Informational signals; not verdicts.

on.exit coverage

0%

Unsafe pattern score

0

Dep constraint coverage

14.3%

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

1

First release

2026-04-24

Latest release

2026-04-24

Avg cadence

Cold removal rate

Dep drift

0

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

Dependency Network

Dependencies Reverse dependencies cli DBI dbplyr dplyr duckdb duckspatial glue duckh3

Version History

1 tracked
new 0.1.0 Apr 24, 2026