Skip to content

gratia

Graceful 'ggplot'-Based Graphics and Other Functions for GAMs Fitted Using 'mgcv'

v0.11.2 · Feb 6, 2026 · MIT + file LICENSE

Description

Graceful 'ggplot'-based graphics and utility functions for working with generalized additive models (GAMs) fitted using the 'mgcv' package. Provides a reimplementation of the plot() method for GAMs that 'mgcv' provides, as well as 'tidyverse' compatible representations of estimated smooths.

Downloads

CRAN

5.5K

Last 30 days

1557th

18.2K

Last 90 days

124K

Last year

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

r2u CRAN

20

Last 30 days

83

Last 90 days

314

Last year

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

autoCRAN

6

Last 7 days

29

Last 30 days

0

All-time

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

CRAN Check Status

13 OK
Show all 13 flavors
Flavor Status
r-devel-linux-x86_64-debian-clang OK
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 OK
r-release-linux-x86_64 OK
r-release-macos-arm64 OK
r-release-macos-x86_64 OK
r-release-windows-x86_64 OK

Check History

OK 14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Mar 10, 2026

Line coverage

Expression

Tests / Examples

Functions

698 123 exported

Complexity

2.7 avg / 26 max

Call network

698 nodes / 855 edges

Test coverage has not been measured for this package yet; nodes fall back to a neutral fill.

Loading call graph…

Lowest coverage

Per-function coverage is not measured for this package yet.

Code

Structure

Lines of code

48,167

Files

596

Compiled share

0%

Has compiled src

No

Language breakdown

R 22,192 (46.1%)Tests 16,831 (34.9%)Docs 9,000 (18.7%)Vignettes 144 (0.3%)

API

Exported functions

124

Internal functions

17

Recent export changes

v0.9.0+20 add_fitted_samples, add_posterior_samples, add_predicted_samples +17 more
v0.8.1+12 check_is_mgcv_smooth, evenly, level +9 more  −1 seq_min_max

Testing & CI

Has tests

Yes

Test-to-code ratio

4.33

testthat edition

3

CI present

No

CI type

[]

PR gated

No

Docs

Return-value doc rate

46.7%

\dontrun example ratio

0%

Roxygen coverage

100%

Has pkgdown

No

NEWS present

Yes

Health & Security signals

Informational signals; not verdicts.

on.exit coverage

Unsafe pattern score

0

Dep constraint coverage

32%

Secret pattern count

0

Bundled 3rd-party code

2 items

Portability & License

Min R version

4.1.0

System requirements

C++ standard

License

MIT + file LICENSE

License flags

SPDX valid, OSI approved

History

Versions

19

First release

2019-02-01

Latest release

2026-02-07

Avg cadence

88 days

Cold removal rate

100%

Dep drift

18

LOC over versions

v0.2-1: 8,079 LOCv0.2-8: 8,209 LOCv0.3.0: 10,636 LOCv0.3.1: 12,017 LOCv0.4.1: 14,945 LOCv0.5.0: 16,615 LOCv0.5.1: 17,492 LOCv0.6.0: 19,092 LOCv0.7.0: 26,492 LOCv0.7.2: 27,741 LOCv0.7.3: 28,249 LOCv0.8.1: 32,901 LOCv0.8.2: 32,840 LOCv0.9.0: 42,614 LOCv0.9.2: 42,196 LOCv0.10.0: 43,828 LOCv0.11.0: 47,284 LOCv0.11.1: 47,588 LOCv0.11.2: 48,167 LOC

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

Reverse Dependencies (4)

suggests

Dependency Network

Dependencies Reverse dependencies mgcv ggplot2 tibble dplyr tidyr rlang patchwork vctrs mvnfast purrr stringr tidyselect lifecycle pillar cli +6 more dependencies cgaim galamm smimodel stgam gratia

Version History

20 tracked
new 0.11.2 Mar 10, 2026
updated 0.11.2 ← 0.11.1 diff Feb 6, 2026
updated 0.11.1 ← 0.11.0 diff Aug 24, 2025
updated 0.11.0 ← 0.10.0 diff Aug 17, 2025
updated 0.10.0 ← 0.9.2 diff Dec 18, 2024
updated 0.9.2 ← 0.9.0 diff Jun 24, 2024
updated 0.9.0 ← 0.8.2 diff Mar 26, 2024
updated 0.8.2 ← 0.8.1 diff Jan 8, 2024
updated 0.8.1 ← 0.7.3 diff Feb 1, 2023
updated 0.7.3 ← 0.7.2 diff May 8, 2022
updated 0.7.2 ← 0.7.0 diff Mar 16, 2022
updated 0.7.0 ← 0.6.0 diff Feb 6, 2022
updated 0.6.0 ← 0.5.1 diff Apr 17, 2021
updated 0.5.1 ← 0.5.0 diff Jan 23, 2021
updated 0.5.0 ← 0.4.1 diff Jan 10, 2021