← Back to all sparks
S

splines2

ANALYTICS
Velocity0.0

R package splines2 by wenjie2wang — release notes from GitHub.

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

r-packagesplinesrcppinteroperabilitystatistics
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.

Recent moves

  1. 1y ago

    Natural cubic splines fixed for a single internal knot

    A wrong basis in a specific knot configuration is the sort of defect that produces plausible but incorrect fits. Fixing it, plus quieting an out-of-boundary warning in plot(), is the whole release.

    View source ↗
  2. 2y ago

    C++20 constructor template warning suppressed

    Compiler housekeeping for a package whose Rcpp interface is a substantial part of its value - invisible to R callers, necessary to keep the C++ side building.

    View source ↗
  3. 2y ago

    plot() accepts a coefficient vector

    Extends the plotting methods introduced in 0.5.0 from drawing basis functions to drawing the fitted function itself - a small step that makes the visualisation useful after fitting rather than only before.

    View source ↗
  4. 2y ago

    Broken package-level documentation repaired

    A roxygen docType repair with no functional change, filed two months after the release that reshaped the package.

    View source ↗
  5. 3y ago

    Periodic B-splines, nsk(), and a basis conversion matrix

    ⚡ SPARK

    The release everything else in this window either follows from or corrects: a new basis type, a compatibility function, formula-friendly aliases, and a conversion route in from other software's splines.

    View source ↗
  6. 3y ago

    Periodic M-spline knot sequence fixed in the Rcpp interface

    A follow-up correction to the periodic spline work, letting callers specify a simple knot sequence through the C++ interface. It predates 0.5.0 in version order but addresses the same feature area.

    View source ↗