← Back to all sparks
L

labelled

ANALYTICS
Velocity0.0

R package labelled by larmarange — release notes from GitHub.

The bridge between Stata/SPSS labelled data and tidy R keeps widening, one integration at a time.

survey-datadata-labelsstata-spssmetadatatidyverser-package
Current state
labelled manages variable labels, value labels and user-defined missing values on data imported from Stata, SPSS and SAS, filling the gap between those formats' metadata and R's native types. Recent releases have pushed outward from the core label accessors: survey design objects from the survey package are now supported throughout, look_for() results can be rendered as formatted gt tables, and dictionary data frames convert in both directions. Error messaging moved wholesale to cli in 2.14.0.
Where it's heading
The arc is toward being usable wherever labelled data ends up, not just where it is loaded. Each recent release either extends support to another object type — survey designs, packed columns, plain vectors, tibbles with list columns — or adds a conversion path between labels and some other representation. The look_for() search function has become a second centre of gravity alongside the label accessors, accumulating its own output formats and long-format conversions.
Prediction
The pattern of adding compatibility with one more object type or output format per release is stable and likely continues. Nothing in these entries indicates a change to the underlying haven_labelled representation the package is built on.

Recent moves

  1. 9mo ago

    Formatted look_for() tables and two-way dictionary conversion

    Continues the outward push on both fronts: to_gt() turns a variable search into presentable output, while dictionary_to_variable_labels() and dictionary_to_value_labels() complete the round trip from a dictionary data frame back into label lists. The new .overwrite argument addresses the ambiguity of setting labels where some already exist.

    View source ↗
  2. 11mo ago

    Survey design objects supported across the package

    Extending label handling to survey design objects is the natural completion of a path that began with look_for() accepting them in 2.10.0. For the survey researchers this package serves, it removes the point where labels stopped travelling with the data.

    View source ↗
  3. 1y ago

    Regression in set_variable_labels() corrected

    A point release fixing a bug the previous version introduced in the .labels argument. No other change.

    View source ↗
  4. 1y ago

    cli adopted for all messaging; null_action gains options

    Moving errors, warnings and messages to cli is consistency work on the package's least visible surface, and it lands alongside more control over how missing labels are reported. Access to the variable name inside update_variable_labels_with() closes an obvious gap in the function added a release earlier.

    View source ↗
  5. 2y ago

    Custom functions can rewrite variable and value labels in bulk

    update_variable_labels_with() and update_value_labels_with() move the package past one-at-a-time label assignment toward programmatic rewriting across a dataset. The null_action arguments introduced here became a recurring pattern in later releases.

    View source ↗
  6. 3y ago

    Packed columns supported and label attributes exposed directly

    Support for packed columns extends labels into a tidyr structure they previously did not survive, and the new label_attribute() helpers let the attribute be manipulated on any object rather than only on supported types. An early example of the pattern of meeting labelled data wherever it lands.

    View source ↗