surveytidy 0.6.0

New features

survey_collection support

Collection-aware methods for all standard dplyr/tidyr verbs are now dispatched per-survey when called on a survey_collection. The result is a new survey_collection whose @id, @if_missing_var, and @groups properties are preserved.

The .if_missing_var argument on each verb ("error" (default) or "skip") lets you override the collection’s stored missing-variable behaviour for a single call. Skipped surveys are reported via the typed message class surveytidy_message_collection_skipped_surveys.

The 6 join verbs (left_join(), right_join(), inner_join(), full_join(), semi_join(), anti_join()) error with surveytidy_error_collection_verb_unsupported when called on a survey_collection. Apply joins inside a per-survey pipeline before constructing the collection.

surveycore re-exports

library(surveytidy) is now sufficient to use the collection construction and setter API. The following surveycore symbols are re-exported:

Bug fixes

New error / warning / message classes

Dependency changes


surveytidy 0.5.0

New features

Survey-aware join functions

Eight join and binding functions are now available for combining survey design objects with plain data frames. All join functions protect design variable columns (weights, strata, PSU, etc.) from being overwritten by y and append a typed sentinel to @variables$domain for traceability by Phase 1 estimation functions.

Row statistic helpers

Two helper functions are now available for computing row-wise statistics inside mutate(). Both propagate metadata automatically and accept .label and .description to document the new variable in a single step.

Bug fixes


surveytidy 0.4.0

New features

Survey-aware transformation functions

Five vector-level transformation functions are now available for converting, collapsing, and reversing variables inside mutate(). All five propagate value labels automatically and accept .label and .description arguments to attach metadata in a single step.


surveytidy 0.3.0

New features

Survey-aware recoding functions

Six vector-level recoding functions are now available. Each shadows its dplyr equivalent and adds optional arguments for attaching variable labels, value labels, and transformation notes directly inside mutate(). Without any of those arguments, output is identical to dplyr.

Shared label arguments

All six functions support a common set of label arguments that propagate into @metadata when used inside mutate():

case_when() and recode_values() also accept .factor = TRUE, which returns an ordered factor instead of a character vector (levels follow formula or to order respectively). .factor and .label cannot be combined.

mutate() enhancements

mutate() now coordinates label propagation automatically: it pre-attaches label attributes from @metadata before the inner dplyr call so recode functions can see existing labels, reads the label output back from recoded columns, and writes it into @metadata — all without extra user steps. The weight-column warning has also been split into two distinct classes: surveytidy_warning_mutate_weight_col for the weight column and surveytidy_warning_mutate_structural_var for strata, PSU, FPC, and replicate weights.


surveytidy 0.2.1

Website & branding

Infrastructure


surveytidy 0.2.0

New verbs

New predicates

Verb support for survey_result objects

Bug fixes

Improvements

Documentation


surveytidy 0.1.0

First release. Implements a complete set of dplyr and tidyr verbs for survey design objects created with the surveycore package.

New verbs

Statistical design

The key design decision in surveytidy is that filter() never removes rows. Removing rows from a survey design changes which units contribute to variance estimation and produces incorrect standard errors for subpopulation statistics. filter() instead writes a logical domain column (..surveycore_domain..) to @data. Phase 1 estimation functions will read this column to restrict calculations to the domain while retaining all rows for variance estimation.

Infrastructure