Releases: insightsengineering/cards
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 #508
- adding the line for aria label by @ShreyaSreeram27 in #512
- Fix bug in hierarchical ARDs with >2
byvariables by @edelarua in #517 - Use
skip_if_pkg_not_installed()by @edelarua in #518 - Add dependencies to .revdeprefs.yaml by @shajoezhu in #523
- Update cli package version requirement to 3.6.5 by @shajoezhu in #526
- deprecate shuffle by @bzkrouse in #520
New Contributors
- @ShreyaSreeram27 made their first contribution in #512
Full Changelog: 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 #472
- Update
filter_ard_hierarchical()to allow filtering by any hierarchy variable by @edelarua in #468 - Update .distinct default documentation for bind_ard() Closes #469 by @malanbos in #473
- Add option to filter hierarchical ARDs by difference in two rates by @edelarua in #439
- Fix bug when removing empty table sections with no
byby @edelarua in #479 - ADD adlb dataset by @ayogasekaram in #481
- 337 shuffle ard handle ard vars from stack by @dragosmg in #466
- 484
shuffle_ard()preserves theargsattribute by @dragosmg in #485 - add by_stats options to stacking functions by @bzkrouse in #491
- Add option to sort hierarchical ARDs differently at each level by @edelarua in #493
- Add Malan as author and Clymb Clinical as funder by @malanbos in #480
- Add args as an attribute to output of
ard_stack()by @bzkrouse in #489 - deprecate shuffling inside stack functions. by @dragosmg in #478
- Rename core cards functions by @ddsjoberg in #495
- retain strata values when nesting by @ayogasekaram in #496
- make deprecated functions visible by @bzkrouse in #502
- Long data ARDs Vignette by @ddsjoberg in #503
- Long data ards by @ddsjoberg in #504
New Contributors
Full Changelog: 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 #410
- Revert "Create .revdeprefs.yaml" by @kimjj93 in #428
- Adding
ard_identity()by @ddsjoberg in #432 - update forcats standalone script by @ayogasekaram in #436
- Update options help file by @kimjj93 in #433
- Fix
sort_ard_hierarchical()bug whenoverall=TRUEby @edelarua in #434 - Fix bug in ard_stack_hierarchical warning for non-unique
ids by @bzkrouse in #446 - Add
TRTAto ADSL data frame by @kimjj93 in #441 - Updating any
fmt_fnreferences tofmt_funfor consistency by @ddsjoberg in #455 - Add
AETOXGRtoADAEby @edelarua in #459 - Add R/medicine25 talk by @Melkiades in #460
- 447 shuffle bug by @bzkrouse in #463
New Contributors
- @Melkiades made their first contribution in #460
Full Changelog: 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 #401
- Adding
ard_formals()by @ddsjoberg in #407 - Fix in sort order in
nest_for_ard()by @ddsjoberg in #412 - Add functionality to sort & filter
ard_stack_hierarchical()results by @edelarua in #392 - adding
unlist_ard_columns()function by @ddsjoberg in #417 - Closes #399 by @kimjj93 in #415
- Check
devtools::build_readme()also buildindex.Rmd? by @kimjj93 in #420 - Sort
ard_stack_hierarchical()results by default by @edelarua in #424 - Updates for
rename_ard_columns(), addingunlist_ard_columns()by @ddsjoberg in #413
Full Changelog: 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 #403
Full Changelog: 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 #364
- Replace logo.png by logo.svg by @llrs-roche in #367
- Revert to png logo by @llrs-roche in #370
- Adding revdepcheck Instructions to PR Template by @ddsjoberg in #369
- 342 sorting by @bzkrouse in #368
- adding group rename functions by @ddsjoberg in #376
- Adding cumulative counts and percents to
ard_categorical()by @ddsjoberg in #373 - Update
ard_hierarchical()denominatorargument description by @edelarua in #374 - Adding links to README of slides/recordings by @ddsjoberg in #377
- fixes #261 by @kimjj93 in #383
- Adde
print_ard_conditions(condition_type)argument by @ddsjoberg in #387 - Doc Update: Clarifying proportions vs percentages by @ddsjoberg in #388
- Removing some experimental badges by @ddsjoberg in #389
- 173 improve contributing by @jtalboys in #390
- Adding functionality to include base R rounding by @ddsjoberg in #385
- 357 stat methods vignette by @jtalboys in #365
- lifecycle by @ddsjoberg in #395
- Updated order of grouping variables in ARDs by @ddsjoberg in #394
New Contributors
- @llrs-roche made their first contribution in #367
- @kimjj93 made their first contribution in #383
Full Changelog: 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 #349
- Update check.yaml by @shajoezhu in #351
- Sorting fix for 10+ groups in
tidy_ard_column_order()by @ddsjoberg in #353 - Improved msg in
print_ard_conditions()when the calling function is namedspaced by @ddsjoberg in #354 - print method update by @ddsjoberg in #355
- Update awkward by/strata phrasing by @jtalboys in #358
- Adding
ard_pairwise()by @ddsjoberg in #360 - Adding
as_cards_fn()function by @ddsjoberg in #361
New Contributors
- @shajoezhu made their first contribution in #351
Full Changelog: 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 #318
- Workflow propagations by @walkowif in #304
- Removing NA
ard_stack(.by)values from calculations by @ddsjoberg in #321 - Adding fns for updating ARDs by @ddsjoberg in #315
- Added functions to print conditions by @ddsjoberg in #322
- Adding
rename_ard_columns(unlist)argument by @ddsjoberg in #323 - Added functions for mock tables by @ddsjoberg in #328
- Adding
ard_stack_hierarchical()function by @ddsjoberg in #324 - Check factor variables for
NAor completely missing levels inard_*functions by @jtalboys in #331 - Adding links to other resources in README by @ddsjoberg in #340
- update AE examples by @bzkrouse in #339
- Updating error message in
rename_ard_columns()by @ddsjoberg in #341 - Add columns
fmt_fn,warning, anderrorstoard_attributesoutput by @jtalboys in #343 - Adding
ard_strata()by @ddsjoberg in #303
New Contributors
Full Changelog: v0.2.2...v0.3.0
v0.2.2
New Features & Updates
- Converted
ard_total_n()to an S3 generic and added methodard_total_n.data.frame(). - Added the
bind_ard(.quiet)argument to suppress messaging. (#299) - Improved ability of
shuffle_ard()to populate missing group values where possible. (#306) - Added
apply_fmt_fn(replace)argument. Usereplace=FALSEto retain any previously formatted statistics in thestat_fmtcolumn. (#285) - Added
bind_ard(.distinct)argument, which can remove non-distinct rows from the ARD across grouping variables, primary variables, context, statistic name and value. (#286)
Bug Fixes
- Fix in
print_ard_conditions()when the variables were factors, which did not render properly incli::cli_format(). - Bug fix in
print_ard_conditions()and we can now print condition messages that contain curly brace pairs. (#309)
What's Changed
- Update pkgdown site logo by @edelarua in #293
- Use
AEDECODinstead ofAETERMin tests & examples by @edelarua in #294 - add check_ard_structure() function to unit tests. by @ayogasekaram in #289
- Adding
ard_total_n.data.frame()method by @ddsjoberg in #296 - Add
as_card()function to convert to class 'card' by @edelarua in #292 - Fix bug introduced by returning empty ARD in
ard_complex()by @edelarua in #297 - Fix in
print_ard_conditions()where variable not processed correctly withcli::cli_format()by @ddsjoberg in #298 - Workflow propagations by @walkowif in #284
- Added the
bind_ard(.quiet)argument by @ddsjoberg in #300 - adding more selectors by @ddsjoberg in #280
- Adding
add_calculated_row()by @ddsjoberg in #281 - Added
apply_fmt_fn(replace)argument by @ddsjoberg in #305 - Added
bind_ard(.distinct)argument by @ddsjoberg in #307 - Filling NA group values for "overall" calculations during
shuffle_ard()by @bzkrouse in #306 - Migrated a cardx
ard_shuffle()test by @ddsjoberg in #308 - Bug fix in
print_ard_conditions()when message had curly brace pairs by @ddsjoberg in #310
Full Changelog: v0.2.1...v0.2.2
v0.2.1
- Update in
ard_categorical()to usebase::order()instead ofdplyr::arrange(), so the ordering of variables match the results frombase::table()in some edge cases where sorted order was inconsistent. - Update in
ard_categorical()to runbase::table()output checks against coerced character columns. Previously, we relied on R to perform checks on the type it decided to check against (e.g. when it coerces to a common type). While the initial strategy worked in cases of Base R classes, there were some bespoke classes, such as times from {hms}, where Base R does not coerce as we expected.
What's Changed
- Using
base::order()inard_categorical()by @ddsjoberg in #288 - Update in
ard_categorical()for some non-Base R classes by @ddsjoberg in #290
Full Changelog: v0.2.0...v0.2.1