← Back to all sparks
V

vctrs

DEVOPS
Velocity0.0

Type and size stability rules for vector operations underpinning the tidyverse

vctrs 0.7 moved conditional recoding down into the tidyverse type system.

rtidyversetype-systemvectorizationperformance
Current state
vctrs defines the type and size rules underpinning the tidyverse. Its 0.6.x line was pure maintenance — CRAN-requested C changes, R-devel test fixes, ALTREP performance. Version 0.7.0 broke that pattern with a family of conditional and recoding functions that duplicate dplyr verbs at lower cost.
Where it's heading
The package is absorbing operations that previously lived in dplyr, implementing them once against the shared type rules so every consumer inherits consistent semantics. Releases since have tightened attribute handling in vec_restore() and cleared non-API C usage that R's checking tools now flag.
Prediction
Expect more tidyverse verbs to acquire vctrs-level implementations, and continued removal of non-API C usage as R narrows what packages are permitted to call.

Recent moves

  1. 3mo ago

    vctrs 0.7.3 removes a non-API PRVALUE() usage

    Turns on KeepSource experimentally and removes an accidental use of the non-API PRVALUE(). Both are internal, and the latter continues the ongoing cleanup of C code R no longer sanctions.

    View source ↗
  2. 4mo ago

    vctrs 0.7.2 clears unrecognized attributes in vec_restore()

    vec_restore()'s default method now consistently clears unrecognized attributes from x, where previously the result depended on whether the target carried attributes of its own. A subtle behaviour change, but inconsistent attribute propagation in a foundational package leaks into everything built above it.

    View source ↗
  3. 6mo ago

    vctrs 0.7.1 fixes protection issues found by rchk

    Protection issues found by rchk are fixed. Static-analysis hygiene in the C layer with no user-visible effect.

    View source ↗
  4. 6mo ago

    vctrs 0.7.0 adds vectorized if-else and case-when

    ⚡ SPARK

    A scope expansion for a package that had been strictly foundational: conditional and recoding verbs arrive at the vctrs layer, explicitly outperforming their dplyr equivalents. The 0.7.x releases since have been consolidation around it.

    View source ↗
  5. 2y ago

    vctrs 0.6.5 adjusts C format strings for CRAN

    CRAN-requested changes to C-level format strings plus test fixes for dim<-() changes in R-devel. Compliance work typical of the 0.6.x line.

    View source ↗
  6. 2y ago

    vctrs 0.6.4 fixes vec_c() performance with ALTREP vectors

    Fixes a vec_c() performance problem with ALTREP vectors, including the then-new ALTREP list vectors in R-devel — the kind of regression that would have quietly slowed every tidyverse combine operation. Also adds a class to the vec_locate_matches() overflow error so it can be caught.

    View source ↗