← Back to home
Comparison · Analytics

gratia vs splines2

A side-by-side editorial comparison of gratia and splines2 — release velocity, themes, recent moves, and the top alternatives to consider.

Shared themes:r-package

gratia vs splines2: at a glance

Featuregratiasplines2
SectorAnalyticsAnalytics
Velocity score0.00.0
Sparks · 30d00
Top themesgam, mgcv, ggplot2, statistical-graphicsr-package, splines, rcpp, interoperability
Last editorial update1h ago53m ago
WebsiteVisit →Visit →

What is gratia?

The tidy front-end for GAMs, now stable enough that upstream ggplot2 sets its release calendar.

gratia wraps mgcv-fitted generalized additive models in tidy data frames and ggplot2 graphics — smooth_estimates(), fitted_values(), derivatives(), draw() and appraise() cover evaluation, prediction and diagnostics. The API reached its intended shape at 0.9.0, when every generated column was renamed to a dot-prefixed form, and 0.10.0 added conditional_values() for covariate-conditional prediction plots.

Read the full gratia trajectory →

What is splines2?

Spline bases built to interoperate: periodic B-splines and an nsk-compatible natural basis.

splines2 provides spline basis functions with their derivatives and integrals, in R and through an Rcpp interface. The 0.5.0 release in mid-2023 set the package's current surface; the four releases since are a correctness fix for natural cubic splines with one internal knot, a plotting argument, a compiler warning, and a documentation repair.

Read the full splines2 trajectory →

gratia vs splines2: editorial side-by-side

G
gratia
ANALYTICS
0.0

The tidy front-end for GAMs, now stable enough that upstream ggplot2 sets its release calendar.

◆ Current state

gratia wraps mgcv-fitted generalized additive models in tidy data frames and ggplot2 graphics — smooth_estimates(), fitted_values(), derivatives(), draw() and appraise() cover evaluation, prediction and diagnostics. The API reached its intended shape at 0.9.0, when every generated column was renamed to a dot-prefixed form, and 0.10.0 added conditional_values() for covariate-conditional prediction plots.

◆ Where it's heading

The package has moved through a long rewrite cycle and out the other side. Successive releases replaced evaluate_smooth() with smooth_estimates(), rebuilt draw() on top of it, then renamed the entire output vocabulary to avoid colliding with user variables. That work is finished; 0.11.1 is driven almost entirely by ggplot2 4.0.0 compatibility, with new mgcv family support for quantile residuals riding along. Development now tracks upstream breakage rather than internal redesign.

◆ Prediction

Expect the next releases to continue absorbing ggplot2 4.x and mgcv changes, with incremental family coverage in quantile_residuals() as the visible new work. The entries give no signal on which mgcv families come next.

S
splines2
ANALYTICS
0.0

Spline bases built to interoperate: periodic B-splines and an nsk-compatible natural basis.

◆ Current state

splines2 provides spline basis functions with their derivatives and integrals, in R and through an Rcpp interface. The 0.5.0 release in mid-2023 set the package's current surface; the four releases since are a correctness fix for natural cubic splines with one internal knot, a plotting argument, a compiler warning, and a documentation repair.

◆ Where it's heading

The direction is interoperability rather than new mathematics. 0.5.0 added nsk() to match survival::nsk(), an H matrix for converting cubic B-splines produced elsewhere into this package's natural splines, and short aliases meant to be typed inside model formulas. Periodic B-splines were the one genuinely new basis, and its Rcpp knot-sequence handling needed a follow-up fix. Wenjie Wang maintains it alongside intsurv and reda.

◆ Prediction

The last four releases are all corrections, so the next one most likely continues that pattern; a further basis type would break a two-year run of consolidation.

Alternatives to gratia and splines2

Other Analytics products tracked by Sparkpulse, ranked by recent ship velocity. Each card links to a full editorial trajectory and lets you pivot into a head-to-head comparison with either gratia or splines2.

See all gratia alternatives → · See all splines2 alternatives →

Recent activity from gratia and splines2

Latest ship moves from both products, interleaved chronologically. ⚡ = editorial spark.

  1. 11mo agogratiaggplot2 4.0.0 compatibility, plus four more quantile-residual families
  2. 1y agosplines2Natural cubic splines fixed for a single internal knot
  3. 1y agogratiaconditional_values() replaces vis.gam for conditional prediction plots
  4. 2y agosplines2C++20 constructor template warning suppressed
  5. 2y agogratiaparametric_effects() joins the dot-prefix rename; LSS families begin
  6. 2y agosplines2plot() accepts a coefficient vector
  7. 2y agogratiaEvery generated column gains a dot prefix
  8. 2y agosplines2Broken package-level documentation repaired
  9. 3y agosplines2Periodic B-splines, nsk(), and a basis conversion matrix
  10. 3y agosplines2Periodic M-spline knot sequence fixed in the Rcpp interface
  11. 3y agogratiaReal variable names in smooth_samples(), plus dplyr 1.1.0 fixes
  12. 4y agogratiaM1 example output fixes and confint tibble returns

Frequently asked questions

What is the difference between gratia and splines2?

Both compete on the same themes — r-package — within Analytics. gratia and splines2 are shipping at a similar cadence (velocity 0.0 vs 0.0, both within Sparkpulse's "active" band). See the at-a-glance table above for a side-by-side breakdown of velocity, recent sparks, and editorial themes.

Is gratia better than splines2?

Sparkpulse doesn't pick a winner — we score release velocity, not feature parity. gratia and splines2 are shipping at a similar cadence (velocity 0.0 vs 0.0, both within Sparkpulse's "active" band). For your specific use case, the alternatives sections above list other Analytics products to evaluate alongside.

What are the best alternatives to gratia?

Top gratia alternatives in Analytics are ranked by recent ship velocity. Browse the "gratia alternatives" section above for the current picks, or visit /alternatives/gratia for the full list with editorial commentary on each.

What are the best alternatives to splines2?

Top splines2 alternatives in Analytics are ranked by recent ship velocity. Browse the "splines2 alternatives" section above for the current picks, or visit /alternatives/splines2 for the full list with editorial commentary on each.