Skip to content

Conversation

@martinctc
Copy link
Owner

Summary

This PR prepares the surveytoolbox package for its first CRAN release.

This PR introduces a robust test suite for the surveytoolbox package using testthat, significantly improving code reliability and maintainability.

Changes

🔧 Functions Tested

Comprehensive test coverage for core package functions including:

  • any_x - Enhanced any() function with NA handling
  • as_percent - Number to percentage conversion
  • box_it - Binary variable creation with labels
  • CAGR - Compound annual growth rate calculations
  • clean_strings - Variable name cleaning
  • apply_row - Rowwise operations
  • look_up - Lookup table functionality
  • wrap_text - Text wrapping for visualizations
  • Label functions (set_varl, set_vall)
  • NPS functions (as_nps)
  • Utility functions (maxmin, create_named_list, likert_convert)

Checks

  • All R CMD checks pass
  • roxygen2::roxygenise() has been run prior to merging to ensure that .Rd and NAMESPACE files are up to date.
  • NEWS.md has been updated.

Change Type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature (incl. changes to visualizations)
  • Technical design
  • Build related changes (e.g. tests)
  • Refactoring (no functional changes, no api changes)
  • Code style update (formatting, renaming) or Documentation content changes
  • Other (please describe):

Notes

This fixes #<issue_number>

<other things, such as how to incorporate new changes>

@martinctc martinctc self-assigned this Jun 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants