Releases: pharmaverse/cards
Release list
v0.8.1
- The output of
bind_ard()now has a"bind_ard"class. (#572; @alanahjonas95). unlist_ard_columns()andrename_ard_columns()now return objects subclassed"card_unlisted"and"card_renamed"respectively, rather than retaining the"card"class. The result no longer satisfies the ARD contract, so functions requiring a proper ARD now reject these objects with a clear error.rename_ard_columns()accepts both"card"and"card_unlisted"inputs. (#513, @Melkiades)- Fixed
get_ard_statistics()to returnNULLstatistics unchanged instead of attempting to attach attributes toNULL, which errors as of R 4.5.0.
What's Changed
- Make tidy_as_ard() tests robust to R-devel fisher.test change by @ddsjoberg in https://github.com/insightsengineering/cards/pull/573
- create bind_ard class by @alanahjonas95 in https://github.com/insightsengineering/cards/pull/572
- fix: remove 'card' class after unlist_ard_columns() and rename_ard_columns() by @Melkiades in https://github.com/insightsengineering/cards/pull/566
- add my name to description by @alanahjonas95 in https://github.com/insightsengineering/cards/pull/574
- perf: optimized core tabulation and summary functions; added benchmark suite by @kpagacz in https://github.com/insightsengineering/cards/pull/575
New Contributors
- @kpagacz made their first contribution in https://github.com/insightsengineering/cards/pull/575
Full Changelog: insightsengineering/cards@v0.8.0...v0.8.1
v0.8.0
New Features and Functions
- Added new functions
compare_ard(),is_ard_equal(), andcheck_ard_equal(). (#437; @malanbos) - Adding
ard_tabulate_rows()function to tabulate the number of rows in a data frame. (#531)
Other Updates
as_cardnow has the argumentcheck = TRUEwhich whenTRUEwill confirm if the data frame being converted matches the cards spec usingcheck_ard_structure. To support this,check_ard_structurehas a new argumenterror_on_failwhich is FALSE by default. When TRUE any failures will generate an error. (#514)- Users are now messaged if the
byorstrataarguments pass columns with different classes in theard_tabulate(data,denominator)arguments as this may cause issues downstream. (#515) - Similar to
ard_stack_hierarchical()andard_stack(), otherard_*()functions andnest_for_ard()now contain anargsattribute to retain information about input arguments. (#483) - The
ard_stack_hierarchical*()functions now return a subclass with the calling function name. - The following functions now return an object with an
'args'attribute that contains more contextual information about the objects' creation.ard_strata(),ard_pairwise(),ard_summary(),ard_tabulate(),ard_tabulate_value(),ard_hierarchical(),ard_hierarchical_count(),ard_missing(),ard_mvsummary()andnest_for_ard()contain an args attribute to retain information about input arguments. (#483, @alanahjonas95) - Update in
ard_tabulate()to account for change inas.data.frame()being released in R-Devel. (#554)
Bug Fixes
- Fixed bug in
rename_ard_columns()whereby factor variables were getting converted to integers and added parameterfct_as_chras is used inunlist_ard_columns()(#542)
What's Changed
- Adding
ard_tabulate_rows()function by @ddsjoberg in https://github.com/insightsengineering/cards/pull/533 - adding messaging for mismatched columns by @ddsjoberg in https://github.com/insightsengineering/cards/pull/532
- Create rev-dep-check.yaml by @ddsjoberg in https://github.com/insightsengineering/cards/pull/538
- Make as card check format by @kieranjmartin in https://github.com/insightsengineering/cards/pull/534
- update_ard_fmt_fn needs some love by @kimjj93 in https://github.com/insightsengineering/cards/pull/535
- fix factor to integer bug by @alanahjonas95 in https://github.com/insightsengineering/cards/pull/543
- Fix partial matching issue in
sort_ard_hierarchical()by @jszczypinski in https://github.com/insightsengineering/cards/pull/551 - Update rev-dep-check.yaml by @ddsjoberg in https://github.com/insightsengineering/cards/pull/544
- Fix NA row names error on R-devel in
.table_as_df()by @ddsjoberg in https://github.com/insightsengineering/cards/pull/554 - Adding the
compare_ard(),is_ard_equal()andcheck_ard_equal()functions by @ddsjoberg in https://github.com/insightsengineering/cards/pull/552 - Fix duplicate helpers and expand compare_ard() tests by @malanbos in https://github.com/insightsengineering/cards/pull/560
- Add args by @bzkrouse in https://github.com/insightsengineering/cards/pull/558
- deprecation cycle updates by @ddsjoberg in https://github.com/insightsengineering/cards/pull/561
- Init by @jszczypinski in https://github.com/insightsengineering/cards/pull/564
- Add pharmaverse/cardinal to .revdeprefs.yaml by @shajoezhu in https://github.com/insightsengineering/cards/pull/565
New Contributors
- @kieranjmartin made their first contribution in https://github.com/insightsengineering/cards/pull/534
- @alanahjonas95 made their first contribution in https://github.com/insightsengineering/cards/pull/543
- @jszczypinski made their first contribution in https://github.com/insightsengineering/cards/pull/551
Full Changelog: insightsengineering/cards@v0.7.1...v0.8.0
v0.7.1
- Updated
ard_stack_hierarchical()so that thedenominatordataset only contains theidandbyvariables. (#482) - Fixed bug in
sort_ard_hierarchical()causing an error when sorting hierarchical ARDs with more than 2byvariables. (#516) shuffle_ard()has been deprecated and will be maintained in {tfrmt} going forward. (#509)
What's Changed
- only by and id for denominator (fixes #482) - redo of original with A… by @malanbos in https://github.com/insightsengineering/cards/pull/508
- adding the line for aria label by @ShreyaSreeram27 in https://github.com/insightsengineering/cards/pull/512
- Fix bug in hierarchical ARDs with >2
byvariables by @edelarua in https://github.com/insightsengineering/cards/pull/517 - Use
skip_if_pkg_not_installed()by @edelarua in https://github.com/insightsengineering/cards/pull/518 - Add dependencies to .revdeprefs.yaml by @shajoezhu in https://github.com/insightsengineering/cards/pull/523
- Update cli package version requirement to 3.6.5 by @shajoezhu in https://github.com/insightsengineering/cards/pull/526
- deprecate shuffle by @bzkrouse in https://github.com/insightsengineering/cards/pull/520
New Contributors
- @ShreyaSreeram27 made their first contribution in https://github.com/insightsengineering/cards/pull/512
Full Changelog: insightsengineering/cards@v0.7.0...v0.7.1
v0.7.0
New Features and Functions
- Updated
sort_ard_hierarchical()to allow for different sorting methods at each hierarchy variable level. (#487) - Updated
sort_ard_hierarchical()andfilter_ard_hierarchical()to always keep attribute and total N rows at the bottom of the ARD. - Added argument
vartofilter_ard_hierarchical()to allow filtering by any hierarchy variable. (#467) - Added flexibility to filter by
byvariable level-specific values when usingfilter_ard_hierarchical()to allow for filtering of hierarchical ARDs by difference in two rates. (#438) - The
ard_strata()function has been updated to include the strata columns in the nested data frames. (#461) - Similar to
ard_stack_hierarchical(),ard_stack()contains anargsattribute to retain information about input arguments. - Added an article illustrating how to summarize long data structures. (#356)
- Added
ard_stack(.by_stat)andard_stack_hierarchical(by_stat)arguments that, whenTRUE(the default), includes a univariate ARD tabulation of thebyvariable in the returned ARD. (#335) shuffle_ard()passes down theargsattribute of the inputcardobject when present. (#484, @dragosmg)shuffle_ard()fills overall or group statistics with"Overall <column_name>"or"Any <column_name>". (#337, @dragosmg)shuffle_ard()messages if"Overall <column_names>"is accidentally present in the data and creates a unique label. (#465, @dragosmg)- Add
ADLBdata set. (#450)
Lifecycle Changes
-
The following functions have been renamed. The old functions still work in the package, and will be soft deprecated in the next release. (#470)
ard_continuous()toard_summary()ard_complex()toard_mvsummary()ard_categorical()toard_tabulate()ard_dichotomous()toard_tabulate_value()
-
shuffleand.shufflearguments (forard_stack_hierarchical()andard_stack()) are deprecated and users encouraged to callshuffle_ard()directly. (#475, @dragosmg)
What's Changed
- fix: Misc workflow fixes by @cicdguy in https://github.com/insightsengineering/cards/pull/472
- Update
filter_ard_hierarchical()to allow filtering by any hierarchy variable by @edelarua in https://github.com/insightsengineering/cards/pull/468 - Update .distinct default documentation for bind_ard() Closes #469 by @malanbos in https://github.com/insightsengineering/cards/pull/473
- Add option to filter hierarchical ARDs by difference in two rates by @edelarua in https://github.com/insightsengineering/cards/pull/439
- Fix bug when removing empty table sections with no
byby @edelarua in https://github.com/insightsengineering/cards/pull/479 - ADD adlb dataset by @ayogasekaram in https://github.com/insightsengineering/cards/pull/481
- 337 shuffle ard handle ard vars from stack by @dragosmg in https://github.com/insightsengineering/cards/pull/466
- 484
shuffle_ard()preserves theargsattribute by @dragosmg in https://github.com/insightsengineering/cards/pull/485 - add by_stats options to stacking functions by @bzkrouse in https://github.com/insightsengineering/cards/pull/491
- Add option to sort hierarchical ARDs differently at each level by @edelarua in https://github.com/insightsengineering/cards/pull/493
- Add Malan as author and Clymb Clinical as funder by @malanbos in https://github.com/insightsengineering/cards/pull/480
- Add args as an attribute to output of
ard_stack()by @bzkrouse in https://github.com/insightsengineering/cards/pull/489 - deprecate shuffling inside stack functions. by @dragosmg in https://github.com/insightsengineering/cards/pull/478
- Rename core cards functions by @ddsjoberg in https://github.com/insightsengineering/cards/pull/495
- retain strata values when nesting by @ayogasekaram in https://github.com/insightsengineering/cards/pull/496
- make deprecated functions visible by @bzkrouse in https://github.com/insightsengineering/cards/pull/502
- Long data ARDs Vignette by @ddsjoberg in https://github.com/insightsengineering/cards/pull/503
- Long data ards by @ddsjoberg in https://github.com/insightsengineering/cards/pull/504
New Contributors
- @malanbos made their first contribution in https://github.com/insightsengineering/cards/pull/473
- @dragosmg made their first contribution in https://github.com/insightsengineering/cards/pull/466
Full Changelog: insightsengineering/cards@v0.6.1...v0.7.0
v0.6.1
New Features and Functions
- Added new function
ard_identity()for saving pre-calculated statistics in an ARD format. (#379)
Lifecycle Changes
- Updating any
fmt_fnreferences tofmt_funfor consistency.- Any function with an argument
cards::foo(fmt_fn)has been updated tocards::foo(fmt_fun). The old syntax will continue to function, but with a deprecation warning to users. - The following function names have been updated:
alias_as_fmt_fun(),apply_fmt_fun(), andupdate_ard_fmt_fun(). The former function names are still exported from the package, and users will see a deprecation note when they are used. - Importantly, the ARD column named
"fmt_fn"has been updated to"fmt_fun". This change cannot be formally deprecated. For users who were accessing the ARD object directly to modify this column instead of using functions likeupdate_ard_fmt_fun(), this will be a breaking change.
- Any function with an argument
Bug Fixes
- Fix bug in
sort_ard_hierarchical()when hierarchical ARD hasoverall=TRUE. (#431) - Fix bug in
ard_stack_hierarchical()whenidvalues are present in multiple levels of thebyvariables. (#442) - Fix bug in
shuffle_ard()where error is thrown if input contains hierarchical results. (#447)
What's Changed
- Create .revdeprefs.yaml by @shajoezhu in https://github.com/insightsengineering/cards/pull/410
- Revert "Create .revdeprefs.yaml" by @kimjj93 in https://github.com/insightsengineering/cards/pull/428
- Adding
ard_identity()by @ddsjoberg in https://github.com/insightsengineering/cards/pull/432 - update forcats standalone script by @ayogasekaram in https://github.com/insightsengineering/cards/pull/436
- Update options help file by @kimjj93 in https://github.com/insightsengineering/cards/pull/433
- Fix
sort_ard_hierarchical()bug whenoverall=TRUEby @edelarua in https://github.com/insightsengineering/cards/pull/434 - Fix bug in ard_stack_hierarchical warning for non-unique
ids by @bzkrouse in https://github.com/insightsengineering/cards/pull/446 - Add
TRTAto ADSL data frame by @kimjj93 in https://github.com/insightsengineering/cards/pull/441 - Updating any
fmt_fnreferences tofmt_funfor consistency by @ddsjoberg in https://github.com/insightsengineering/cards/pull/455 - Add
AETOXGRtoADAEby @edelarua in https://github.com/insightsengineering/cards/pull/459 - Add R/medicine25 talk by @Melkiades in https://github.com/insightsengineering/cards/pull/460
- 447 shuffle bug by @bzkrouse in https://github.com/insightsengineering/cards/pull/463
New Contributors
- @Melkiades made their first contribution in https://github.com/insightsengineering/cards/pull/460
Full Changelog: insightsengineering/cards@v0.6.0...v0.6.1
v0.6.0
New Features and Functions
-
Added functions
sort_ard_hierarchical()andfilter_ard_hierarchical()to sort & filter ARDs created usingard_stack_hierarchical()andard_stack_hierarchical_count(). (#301) -
Updated
ard_stack_hierarchical()andard_stack_hierarchical_count()to automatically sort results alphanumerically. (#423) -
Added new function
unlist_ard_columns(). (#391) -
Updated function
rename_ard_columns(). (#380)- The function no longer coerces values to character.
- The
fillargument has been added to specify a value to fill in the new column when there are no levels associated with the variables (e.g. continuous summaries). - The
unlistargument has been deprecated in favor of using the newunlist_ard_columns()function. - The function no longer accepts generic data frames: inputs must be a data frame of class
card.
-
Added function
ard_formals()to assist in adding a function's formals, that is, the arguments with their default values, along with user-passed arguments into an ARD structure.
Bug Fixes
- Fixed sorting order of logical variables in
nest_for_ard(). (#411)
Lifecycle Changes
- The
shuffle_ard()function no longer outputs a'label'column, and instead retains the original'variable'level from the cards object. It also no longer trims rows with non-numeric stats values. (#416)
What's Changed
- pull changes from standalone script by @ayogasekaram in https://github.com/insightsengineering/cards/pull/401
- Adding
ard_formals()by @ddsjoberg in https://github.com/insightsengineering/cards/pull/407 - Fix in sort order in
nest_for_ard()by @ddsjoberg in https://github.com/insightsengineering/cards/pull/412 - Add functionality to sort & filter
ard_stack_hierarchical()results by @edelarua in https://github.com/insightsengineering/cards/pull/392 - adding
unlist_ard_columns()function by @ddsjoberg in https://github.com/insightsengineering/cards/pull/417 - Closes #399 by @kimjj93 in https://github.com/insightsengineering/cards/pull/415
- Check
devtools::build_readme()also buildindex.Rmd? by @kimjj93 in https://github.com/insightsengineering/cards/pull/420 - Sort
ard_stack_hierarchical()results by default by @edelarua in https://github.com/insightsengineering/cards/pull/424 - Updates for
rename_ard_columns(), addingunlist_ard_columns()by @ddsjoberg in https://github.com/insightsengineering/cards/pull/413
Full Changelog: insightsengineering/cards@v0.5.1...v0.6.0
v0.5.1
- Small update to account for a change in R-devel.
What's Changed
- Small update to account for a change in R-devel. by @ddsjoberg in https://github.com/insightsengineering/cards/pull/403
Full Changelog: insightsengineering/cards@v0.5.0...v0.5.1
v0.5.0
New Features and Functions
- Added functions
rename_ard_groups_shift()andrename_ard_groups_reverse()for renaming the grouping variables in the ARD. (#344) - Added an option to specify the default rounding in the package:
cards.round_type. See?cards.optionsfor details. (#384) - Added the
print_ard_conditions(condition_type)argument, which allows users to select to return conditions as messages (the default), or have warnings returned as warnings and errors as errors. (#386) - Added the
all_ard_group_n(types)argument to allow separate selection ofgroupXandgroupX_levelcolumns. - Added the
tidy_ard_column_order(group_order)argument that allows users to specify whether the grouping variables are listed in ascending order (the default) or descending order. The output ofard_strata()now callstidy_ard_column_order(group_order="descending").
Other Updates
- A new article has been added detailing how to create new ARD functions.
- Results are now sorted in a consistent manner, by descending groups and strata. (#342, #326)
Lifecycle Updates
- Function
label_cards()has been renamed tolabel_round(), which more clearly communicates that is returns a rounding function.
What's Changed
- Add CRAN release template by @cicdguy in https://github.com/insightsengineering/cards/pull/364
- Replace logo.png by logo.svg by @llrs-roche in https://github.com/insightsengineering/cards/pull/367
- Revert to png logo by @llrs-roche in https://github.com/insightsengineering/cards/pull/370
- Adding revdepcheck Instructions to PR Template by @ddsjoberg in https://github.com/insightsengineering/cards/pull/369
- 342 sorting by @bzkrouse in https://github.com/insightsengineering/cards/pull/368
- adding group rename functions by @ddsjoberg in https://github.com/insightsengineering/cards/pull/376
- Adding cumulative counts and percents to
ard_categorical()by @ddsjoberg in https://github.com/insightsengineering/cards/pull/373 - Update
ard_hierarchical()denominatorargument description by @edelarua in https://github.com/insightsengineering/cards/pull/374 - Adding links to README of slides/recordings by @ddsjoberg in https://github.com/insightsengineering/cards/pull/377
- fixes #261 by @kimjj93 in https://github.com/insightsengineering/cards/pull/383
- Adde
print_ard_conditions(condition_type)argument by @ddsjoberg in https://github.com/insightsengineering/cards/pull/387 - Doc Update: Clarifying proportions vs percentages by @ddsjoberg in https://github.com/insightsengineering/cards/pull/388
- Removing some experimental badges by @ddsjoberg in https://github.com/insightsengineering/cards/pull/389
- 173 improve contributing by @jtalboys in https://github.com/insightsengineering/cards/pull/390
- Adding functionality to include base R rounding by @ddsjoberg in https://github.com/insightsengineering/cards/pull/385
- 357 stat methods vignette by @jtalboys in https://github.com/insightsengineering/cards/pull/365
- lifecycle by @ddsjoberg in https://github.com/insightsengineering/cards/pull/395
- Updated order of grouping variables in ARDs by @ddsjoberg in https://github.com/insightsengineering/cards/pull/394
New Contributors
- @llrs-roche made their first contribution in https://github.com/insightsengineering/cards/pull/367
- @kimjj93 made their first contribution in https://github.com/insightsengineering/cards/pull/383
Full Changelog: insightsengineering/cards@v0.4.0...v0.5.0
v0.4.0
New Features and Functions
- Added functions
as_cards_fn(),is_cards_fn(), andget_cards_fn_stat_names(). These functions assist is creating functions with attributes enumerating the expected results. - Updated
ard_continuous()andard_complex()to return full ARDs when functions passed are created withas_cards_fn(): instead of a single row output, we get a long ARD with rows for each of the expected statistic names. (#316) - Added function
ard_pairwise()to ease the calculations of pairwise analyses. (#359)
Other Updates
- Improved messaging in
print_ard_conditions()when the calling function is namespaced. (#348) - Updated print method for
'card'objects so extraneous columns are never printed by default.
Lifecycle Changes
- No longer exporting functions
check_pkg_installed(),is_pkg_installed(),get_min_version_required(),get_pkg_dependencies(). These functions are now internal-only. (#330)
Bug Fixes
- The
tidy_ard_column_order()now correctly orders grouping columns when there are 10+ groups. This also corrects an issue in the hierarchical functions where the ordering of the variables matters. (#352)
What's Changed
- 330 update standalone@main by @ayogasekaram in https://github.com/insightsengineering/cards/pull/349
- Update check.yaml by @shajoezhu in https://github.com/insightsengineering/cards/pull/351
- Sorting fix for 10+ groups in
tidy_ard_column_order()by @ddsjoberg in https://github.com/insightsengineering/cards/pull/353 - Improved msg in
print_ard_conditions()when the calling function is namedspaced by @ddsjoberg in https://github.com/insightsengineering/cards/pull/354 - print method update by @ddsjoberg in https://github.com/insightsengineering/cards/pull/355
- Update awkward by/strata phrasing by @jtalboys in https://github.com/insightsengineering/cards/pull/358
- Adding
ard_pairwise()by @ddsjoberg in https://github.com/insightsengineering/cards/pull/360 - Adding
as_cards_fn()function by @ddsjoberg in https://github.com/insightsengineering/cards/pull/361
New Contributors
- @shajoezhu made their first contribution in https://github.com/insightsengineering/cards/pull/351
Full Changelog: insightsengineering/cards@v0.3.0...v0.4.0
v0.3.0
New Features & Updates
- Added functions
ard_stack_hierarchical()andard_stack_hierarchical_count()that ease the creation of ARDs for multiple nested or hierarchical structures. (#314) - Added functions
update_ard_fmt_fn()andupdate_ard_stat_label()to update an ARD's formatting function and statistic label, respectively. (#253) - Added
rename_ard_columns(unlist)argument, which unlists specified columns in the ARD data frame. (#313) - Added
ard_strata()function to ease the task of calculating ARDs stratified by one or more other categorical variables. (#273) - Added functions
mock_continuous(),mock_categorical(),mock_dichotomous(),mock_missing(),mock_attributes()to build ARDs in the absence of a data frame. Where applicable, the formatting functions are set to return'xx'or'xx.x'to aid in the construction of mock tables or table shells. (#256) - Added functions for printing results from
eval_capture_conditions(). Captured conditions can be printed as either errors or messages withcaptured_condition_as_error()andcaptured_condition_as_message(), respectively. (#282)
Other Updates
- The
ard_hierarchical_count()function has been updated to match the behavior ofard_hierarchical()and results are now only returned for the last column listed in thevariablesarguments, rather than recursively counting all variables. - Add columns
'fmt_fn','warning', and'errors'toard_attributes()output. (#327) - Add checks for factors with no levels, or any levels that are
NAintoard_*functions (#255) - Any rows with
NAorNaNvalues in the.bycolumns specified inard_stack()are now removed from all calculations. (#320)
What's Changed
- Adding download badge to README by @ddsjoberg in https://github.com/insightsengineering/cards/pull/318
- Workflow propagations by @walkowif in https://github.com/insightsengineering/cards/pull/304
- Removing NA
ard_stack(.by)values from calculations by @ddsjoberg in https://github.com/insightsengineering/cards/pull/321 - Adding fns for updating ARDs by @ddsjoberg in https://github.com/insightsengineering/cards/pull/315
- Added functions to print conditions by @ddsjoberg in https://github.com/insightsengineering/cards/pull/322
- Adding
rename_ard_columns(unlist)argument by @ddsjoberg in https://github.com/insightsengineering/cards/pull/323 - Added functions for mock tables by @ddsjoberg in https://github.com/insightsengineering/cards/pull/328
- Adding
ard_stack_hierarchical()function by @ddsjoberg in https://github.com/insightsengineering/cards/pull/324 - Check factor variables for
NAor completely missing levels inard_*functions by @jtalboys in https://github.com/insightsengineering/cards/pull/331 - Adding links to other resources in README by @ddsjoberg in https://github.com/insightsengineering/cards/pull/340
- update AE examples by @bzkrouse in https://github.com/insightsengineering/cards/pull/339
- Updating error message in
rename_ard_columns()by @ddsjoberg in https://github.com/insightsengineering/cards/pull/341 - Add columns
fmt_fn,warning, anderrorstoard_attributesoutput by @jtalboys in https://github.com/insightsengineering/cards/pull/343 - Adding
ard_strata()by @ddsjoberg in https://github.com/insightsengineering/cards/pull/303
New Contributors
- @jtalboys made their first contribution in https://github.com/insightsengineering/cards/pull/331
Full Changelog: insightsengineering/cards@v0.2.2...v0.3.0