Changelog
Source:NEWS.md
cards 0.2.0
CRAN release: 2024-07-20
New Features & Updates
Converting
ard_*()
functions and other helpers to S3 generics to make them extendable. (#227)Added helper
rename_ard_columns()
for renaming/coalescing group/variable columns. (#213).Added new function
ard_total_n()
for calculating the total N in a data frame. (#236)Added the
nest_for_ard(include_data)
argument to either include or exclude the subsetted data frames in a list-column in the returned tibble.Added
check_ard_structure(column_order, method)
arguments to the function to check for column ordering and whether result contains astat_name='method'
row.Added the optional
ard_heirarchicial(id)
argument. When provided we check for duplicates across the column(s) supplied here. If duplicates are found, the user is warned that the percentages and denominators are not correct. (#214)Improved messaging in
check_pkg_installed()
that incorporates the calling function name in the case of an error. (#205)Updated
is_pkg_installed()
andcheck_pkg_installed()
to allow checks for more than package at a time. Theget_min_version_required()
function has also been updated to return a tibble instead of a list with attributes. (#201)Styling from the {cli} package are now removed from errors and warnings when they are captured with
eval_capture_conditions()
. Styling is removed withcli::ansi_strip()
. (#129)
Bug Fixes
Bug fix in
ard_stack()
when calls to functions were namespaced. (#242)The
print_ard_conditions()
function has been updated to no longer error out if the ARD object does not have"error"
or"warning"
columns. (#240)Bug fix in
shuffle_ard()
where factors were coerced to integers instead of their labels. (#232)
Lifecycle Changes
Corrected order that
ard_categorical
(strata) columns would appear in the ARD results. Previously, they appeared in the order they appeared in the original data, and now they are sorted properly. (#221)The API for
ard_continuous(statistic)
andard_missing(statistic)
arguments has been updated. Previously, the RHS of these argument’s passed lists would be eithercontinuous_summary_fns()
andmissing_summary_fns()
. Now these arguments accept simple character vectors of the statistic names. For example,ard_categorical(statistic = everything() ~ c("n", "p", "N"))
andard_missing(statistic = everything() ~ c("N_obs", "N_miss", "N_nonmiss", "p_miss", "p_nonmiss"))
. (#223)Updated
ard_stack()
to returnn
,p
, andN
for theby
variable when specified. Previously, it only returnedN
which is the same for all levels of the by variable. (#219)Bug fix where
ard_stack(by)
argument was not passed toard_missing()
whenard_stack(.missing=TRUE)
. (#244)The
ard_stack(by)
argument has been renamed to".by"
and its location moved to after the dots inputs, e.g.ard_stack(..., .by)
. (#243)-
A messaging overhaul to utilize the scripts in
https://github.com/ddsjoberg/standalone/blob/main/R/standalone-cli_call_env.R
. This allows clear error messaging across functions and packages. (#42)- The
print_ard_conditions(call)
,check_list_elements(env)
,cards_select(.call)
arguments have been removed.
- The