Skip to content

ggseg3d

Interactive 3D Brain Atlas Visualization

v2.1.2 · Jul 2, 2026 · MIT + file LICENSE

Description

Plot brain atlases as interactive 3D meshes using 'Three.js' via 'htmlwidgets', or render publication-quality static images through 'rgl' and 'rayshader'. A pipe-friendly API lets you map data onto brain regions, control camera angles, toggle region edges, overlay glass brains, and snapshot or ray-trace the result. Additional atlases are available through the 'ggsegverse' r-universe. Mowinckel & Vidal-Piñeiro (2020) <doi:10.1177/2515245920928009>.

Downloads

CRAN

899

Last 30 days

3850th

3K

Last 90 days

8.4K

Last year

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

r2u CRAN

0

Last 30 days

52

Last 90 days

171

Last year

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

autoCRAN

2

Last 7 days

17

Last 30 days

1

All-time

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

CRAN Check Status

3 ERROR
10 OK
Show all 13 flavors
Flavor Status
r-devel-linux-x86_64-debian-clang ERROR
r-devel-linux-x86_64-debian-gcc OK
r-devel-linux-x86_64-fedora-clang OK
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 (3 non-OK)
ERROR r-devel-linux-x86_64-debian-clang

tests

Running ‘spelling.R’ [0s/0s]
  Running ‘testthat.R’ [29s/18s]
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(ggseg3d)
  > 
  > test_check("ggseg3d")
  Starting 2 test processes.
  Saving _problems/test-data_merge-2.R
  [ FAIL 1 | WARN 0 | SKIP 8 | PASS 547 ]
  
  ══ Skipped tests (8) ═══════════════════════════════════════════════════════════
  • On CRAN (8): 'test-visual.R:8:1', 'test-visual.R:13:1', 'test-visual.R:20:1',
    'test-visual.R:26:1', 'test-visual.R:31:1', 'test-visual.R:36:1',
    'test-visual.R:42:1', 'test-visual.R:48:1'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-data_merge.R:2:3'): data_merge works with unified atlas ────────
  Error in `require_sf("atlas_sf()")`: atlas_sf() requires the sf package, which is not installed.
  i Install with `install.packages("sf")`, or use the polygon-format alternative (see `as_polygon_atlas()`).
  Backtrace:
      ▆
   1. └─ggseg.formats::atlas_sf(dk()) at test-data_merge.R:2:3
   2.   └─ggseg.formats:::require_sf("atlas_sf()")
   3.     └─cli::cli_abort(...)
   4.       └─rlang::abort(...)
  
  [ FAIL 1 | WARN 0 | SKIP 8 | PASS 547 ]
  Error:
  ! Test failures.
  Execution halted
ERROR r-patched-linux-x86_64

tests

Running ‘spelling.R’ [0s/0s]
  Running ‘testthat.R’ [28s/18s]
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(ggseg3d)
  > 
  > test_check("ggseg3d")
  Starting 2 test processes.
  Saving _problems/test-data_merge-2.R
  [ FAIL 1 | WARN 0 | SKIP 8 | PASS 547 ]
  
  ══ Skipped tests (8) ═══════════════════════════════════════════════════════════
  • On CRAN (8): 'test-visual.R:8:1', 'test-visual.R:13:1', 'test-visual.R:20:1',
    'test-visual.R:26:1', 'test-visual.R:31:1', 'test-visual.R:36:1',
    'test-visual.R:42:1', 'test-visual.R:48:1'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-data_merge.R:2:3'): data_merge works with unified atlas ────────
  Error in `require_sf("atlas_sf()")`: atlas_sf() requires the sf package, which is not installed.
  i Install with `install.packages("sf")`, or use the polygon-format alternative (see `as_polygon_atlas()`).
  Backtrace:
      ▆
   1. └─ggseg.formats::atlas_sf(dk()) at test-data_merge.R:2:3
   2.   └─ggseg.formats:::require_sf("atlas_sf()")
   3.     └─cli::cli_abort(...)
   4.       └─rlang::abort(...)
  
  [ FAIL 1 | WARN 0 | SKIP 8 | PASS 547 ]
  Error:
  ! Test failures.
  Execution halted
ERROR r-release-linux-x86_64

tests

Running ‘spelling.R’ [0s/0s]
  Running ‘testthat.R’ [28s/16s]
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(ggseg3d)
  > 
  > test_check("ggseg3d")
  Starting 2 test processes.
  Saving _problems/test-data_merge-2.R
  [ FAIL 1 | WARN 0 | SKIP 8 | PASS 547 ]
  
  ══ Skipped tests (8) ═══════════════════════════════════════════════════════════
  • On CRAN (8): 'test-visual.R:8:1', 'test-visual.R:13:1', 'test-visual.R:20:1',
    'test-visual.R:26:1', 'test-visual.R:31:1', 'test-visual.R:36:1',
    'test-visual.R:42:1', 'test-visual.R:48:1'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-data_merge.R:2:3'): data_merge works with unified atlas ────────
  Error in `require_sf("atlas_sf()")`: atlas_sf() requires the sf package, which is not installed.
  i Install with `install.packages("sf")`, or use the polygon-format alternative (see `as_polygon_atlas()`).
  Backtrace:
      ▆
   1. └─ggseg.formats::atlas_sf(dk()) at test-data_merge.R:2:3
   2.   └─ggseg.formats:::require_sf("atlas_sf()")
   3.     └─cli::cli_abort(...)
   4.       └─rlang::abort(...)
  
  [ FAIL 1 | WARN 0 | SKIP 8 | PASS 547 ]
  Error:
  ! Test failures.
  Execution halted

Check History

ERROR 12 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Jun 19, 2026
ERROR r-devel-linux-x86_64-fedora-clang

tests

Running ‘spelling.R’
  Running ‘testthat.R’ [34s/20s]
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 sh
...[truncated]...
ts::atlas_sf(dk()) at test-data_merge.R:2:3
   2.   └─ggseg.formats:::require_sf("atlas_sf()")
   3.     └─cli::cli_abort(...)
   4.       └─rlang::abort(...)
  
  [ FAIL 1 | WARN 0 | SKIP 8 | PASS 547 ]
  Error:
  ! Test failures.
  Execution halted
OK 13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Jun 9, 2026
ERROR 12 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Jun 8, 2026
ERROR r-devel-linux-x86_64-debian-gcc

whether package can be installed

Installation failed.
See ‘/home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/ggseg3d.Rcheck/00install.out’ for details.
OK 13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Apr 28, 2026
ERROR 13 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Mar 10, 2026
ERROR r-oldrel-windows-x86_64

re-building of vignette outputs

Error(s) in re-building vignettes:
--- re-building 'ggseg3d.Rmd' using rmarkdown
File img/intro-basic.png not found in resource path
Error: processing vignette 'ggseg3d.Rmd' failed with diagnostics:
pandoc document conversion failed with error 99
--- failed re-building 'ggseg3d.Rmd'

--- re-building 'shiny.Rmd' using rmarkdown
--- finished re-building 'shiny.Rmd'

SUMMARY: processing the following file failed:
  'ggseg3d.Rmd'

Error: Vignette re-building failed.
Execution halted

Code

Structure

Lines of code

8,353

Files

118

Compiled share

0%

Has compiled src

No

Language breakdown

R 2,808 (33.6%)Tests 3,694 (44.2%)Docs 1,475 (17.7%)Vignettes 376 (4.5%)

API

Exported functions

20

Internal functions

51

Recent export changes

v2.0.0+17 aseg, dk, ggseg3dOutput +14 more  −3 as_ggseg3d_atlas, is_ggseg3d_atlas, remove_axes
v1.6.3+6 add_glassbrain, as_ggseg3d_atlas, ggseg3d +3 more

Testing & CI

Has tests

Yes

Test-to-code ratio

1.32

testthat edition

3

CI present

No

CI type

[]

PR gated

No

Docs

Return-value doc rate

94.1%

\dontrun example ratio

12.5%

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

0%

Secret pattern count

0

Bundled 3rd-party code

2 items

Portability & License

Min R version

4.1

System requirements

C++ standard

License

MIT + file LICENSE

License flags

SPDX valid, OSI approved

History

Versions

5

First release

2021-06-01

Latest release

2026-07-02

Avg cadence

60 days

Cold removal rate

100%

Dep drift

10

LOC over versions

v1.6.3: 1,253 LOCv2.0.0: 7,479 LOCv2.1.0: 7,974 LOCv2.1.1: 8,390 LOCv2.1.2: 8,353 LOC

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

Dependency Network

Dependencies Reverse dependencies cli dplyr ggseg.formats htmlwidgets knitr lifecycle rlang scales tidyr webshot2 ggseg3d

Version History

6 tracked
updated 2.1.2 ← 2.1.1 diff Jul 2, 2026
updated 2.1.1 ← 2.1.0 diff Apr 22, 2026
updated 2.1.0 ← 2.0.0 diff Apr 9, 2026
new 2.0.0 Mar 10, 2026
updated 2.0.0 ← 1.6.3 diff Feb 19, 2026
new 1.6.3 May 31, 2021