Changelog
Source:NEWS.md
xlr 1.1.0
CRAN release: 2026-01-14
New Features
- Added
make_wider()function to easily pivot outputs frombuild_table()and related functions for creating wider table formats. - Added support for
exclude_codesparameter in multiple response questions for the functionbuild_mtable(). This parameter supports passing values like-99that should be excluded from the analysis. See the documentation forbuild_mtable(). - Added column width support to
xlr_format(), instead ofxlrtrying to guess the width. - Created a new type
xlr_n_percent, which combines a count and a percentage. Like all otherxlrtypes, it can be written to Excel.
Vector Arithmetic & Type System Improvements
- Added vector arithmetic support (
vctrs::vec_math()) forxlrtypes. Most base R vector operations are now supported (e.g.,sum(),mean(),median()). Seevctrs::vec_math()for more details on supported operations. -
xlr_integernow supports division and conversion to numeric (returnsxlr_numeric). - Added support for type conversion between all
xlrtypes. You can now convert allxlrtypes to each other, e.g.,xlr_numerictoxlr_integer,xlr_percenttoxlr_integer. -
xlr_percentnow works with ggplot2 without errors. -
as.character()onxlr_percentnow returns formatted percentage strings. - Refactored xlr classes to inherit from base types for better compatibility.
Bug Fixes
- Fixed a bug in
build_qtable()where anNAvalue in one column resulted in the entire row being removed. - Improved error handling in internal tidyr function calls.
Documentation & Testing
- Relaxed restrictions on column value requirements for
build_qtable(). Response values for each column in the block only need to be a subset of the first column. - Improved documentation for question-related functions.
- Added tests for ggplot2 compatibility.
- Updated snapshots for remote tests.
- Updated DESCRIPTION file for latest roxygen2 version.
xlr 1.0.3
CRAN release: 2025-03-07
- CRAN re-submission:
- Fixed title and description to follow CRAN’s standards (moved from back-ticks to single quotes)!
xlr 1.0.1
- CRAN re-submission. Fix issues:
- Made
Excelreferenced in back-ticks ``. - Removed externally facing documentation for internal package functions.
- Changed examples so that they no longer use
\dontrunbut instead create a temporary working directory followingreadrexamples. We instead use\dontshowto hide setting this working directory. - Fixed typos in the vignette.
- Fixed line spacing issues with the Description due to inconsistent space sizing.
- Made