Skip to content

ggdag

0.2.13

Analyze and Create Elegant Directed Acyclic Graphs

12packages depend
125.2Kdownloads / year
57.6%test coverage
13/13checks pass

Overview

About
Maintained by Malcolm BarrettFirst published 2018-03-2715 releasesCRAN page ↗GitHub ↗

Tidy, analyze, and plot directed acyclic graphs (DAGs). 'ggdag' is built on top of 'dagitty', an R package that uses the 'DAGitty' web tool (https://dagitty.net/) for creating and analyzing DAGs. 'ggdag' makes it easy to tidy and plot 'dagitty' objects using 'ggplot2' and 'ggraph', as well as common analytic and graphical functions, such as determining adjustment sets and node relationships.

Install

Health

CRAN checks
13OK
Slowest check: 5.8 min · r-devel-linux-x86_64-fedora-clang
Code health
Yes
Tests · ratio 1.78
57.6%
Coverage · measured lines
99%
Documentation · exports
14
Dependencies · direct
Check history
  • OK2026-06-21
    13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • ERROR2026-06-20
    12 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE
  • OK2026-03-31
    14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • ERROR2026-03-30
    13 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE
  • OK2026-03-28
    14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
Show 2 earlier snapshots
  • ERROR2026-03-25
    13 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE
  • OK2026-03-10
    14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE

Documentation

Documentation
READMEYes · 157 wordsVignettesYes · dynamicpkgdown siteNoNEWSYes · 100% structuredCode of conductNoContributing guideNo
Examples that run
100%
Documented parameters
89%
Return-value docs
63%
References docs
0%

Downloads

125.2K
CRAN downloads in the past year
Rank #1,286 · ~343/day · ~10.4K/mo
Daily download trend is not available in this view yet.
7.3K30 days
26.8K90 days
125.2K1 year
Compare downloads with other packages →
Also on262 r2u7 autocran1.5K conda_forge96 c2d4u

Repository

Repository
465Stars
27Forks
16Open issues
0Open PRs
15Releases
674Commits
6Contributors
rrstatscausal-inferenceggplot-extensiondag
674 commits · Last activity 2026-03-17 · +0.2% stars, 30d

Stars over time

2025-07-19 · 4452026-07-07 · 465

Repository practices

Upstream repositoryBeta

7 development-tooling and community-health practices detected across 5 families in the upstream repository

Checks run against github.com/r-causal/ggdag on 2026-07-19.

Continuous integration (1)
GitHub Actions
Docs source (1)
README.Rmd
Lint, format, editor (3)
AirVS CodeRStudio project
Coverage (1)
Codecov
Show all practices
Governance and community (1)
Funding
How this is detected·Detection ruleset v1 (2026-07-18)

Dependencies

Declared dependencies
21 external dependencies (excludes base and recommended)
Depends (1)
R >= 3.4.0
LinkingTo (0)
none
Enhances (0)
none

Code & Tests

Code Composition
R 5,784 (58%)Rd 3,543 (35%)Vignettes 682 (7%)Markdown 17 (0%)Other 3 (0%)
Code characteristics
Object systems
S343
Cyclomatic complexity
1.0 median / 9 max
Test cases
41 / 1.78 per code line

Test coverage

Line coverage

58%

Expression

60.4%

Tests / Examples

57.6% / 71% ex

Functions

186 95 exported

Complexity

2.2 avg / 9 max

Call network

186 nodes / 409 edges

Loading call graph…

Lowest coverage

186 functions
FunctionCycloCoverage
collider_triangle exp30%
confounder_triangle exp30%
geom_dag_edges_diagonal exp30%
geom_dag_node exp10%
ggdag_adjacent exp50%
ggdag_adjust exp90%

People & History

People (1)
Maintainer (1)
Author, Maintainer
Authors (1)
Author, Maintainer
Package Timeline

15 releases. Pick two to compare their code metrics. R releases are shown for context.

  • R
    R 4.6.0 released · 2026-04-24
  • R
    R 4.5.0 released · 2025-04-11
  • 0.2.13Latest
    2024-07-22 · current release · diff ↗
  • R
    R 4.4.0 released · 2024-04-24
  • 0.2.12
    2024-03-08 · diff ↗
  • 0.2.11
    2024-01-24 · diff ↗
  • 0.2.10
    2023-05-29 · diff ↗
  • 0.2.9
    2023-05-22 · diff ↗
  • R
    R 4.3.0 released · 2023-04-21
  • 0.2.8
    2023-03-17 · diff ↗
  • 0.2.7
    2022-10-29 · diff ↗
  • 0.2.6
    2022-08-26 · diff ↗
  • 0.2.5
    2022-07-16 · diff ↗
  • R
    R 4.2.0 released · 2022-04-22
  • 0.2.4
    2021-10-10 · diff ↗
  • R
    R 4.1.0 released · 2021-05-18
Show 9 earlier events
  • 0.2.3
    2021-01-12 · diff ↗
  • R
    R 4.0.0 released · 2020-04-24
  • 0.2.2
    2020-02-13 · diff ↗
  • 0.2.1
    2019-12-06 · diff ↗
  • 0.2.0
    2019-09-12 · diff ↗
  • R
    R 3.6.0 released · 2019-04-26
  • R
    R 3.5.0 released · 2018-04-23
  • 0.1.0
    2018-03-27
  • R
    R 3.4.0 released · 2017-04-21

Package metadata

First published
2018-03-27
Total releases
15 / 8 yrs
License
MIT + file LICENSE OSI
Minimum R
≥ 3.4.0
Download size
1.9 MB
Installed size
not tracked yet
With dependencies
not tracked yet
Appears in task views
Report a problem with this page →