Skip to content

Releases: pharmaverse/cardx

v0.3.4

Choose a tag to compare

@insights-engineering-bot insights-engineering-bot released this 06 Jul 17:40
  • Fixed bug in ard_stats_mantelhaen_test() where arguments were passed to stats::mantelhaen.test() positionally rather than by name, causing a test failure and incorrect results under R-devel. (#343)

What's Changed

Full Changelog: insightsengineering/cardx@v0.3.3...v0.3.4

v0.3.3

Choose a tag to compare

@insights-engineering-bot insights-engineering-bot released this 29 May 14:53
  • Fixed bug in extract_strata() where parentheses in strata level labels were incorrectly stripped, e.g. "Drug (B)" was truncated to "B". (#2388)
  • Added fix to ensure as_card does not error after update to cards
  • Bug fix in ard_car_vif() where non-syntactic variable names (e.g. those containing spaces) were returned with backticks in the variable column. Since gtsummary::tbl_regression() stores variable names without backticks, this mismatch resulted in empty VIF columns in gtsummary::add_vif(). (#335, @NourEdinDarwish)

What's Changed

New Contributors

Full Changelog: insightsengineering/cardx@v0.3.2...v0.3.3

v0.3.2

Choose a tag to compare

@insights-engineering-bot insights-engineering-bot released this 05 Feb 09:34
  • Swapped internal use of dplyr::case_when() for dplyr::recode_values() as the former is now deprecated. (#327)

Full Changelog: insightsengineering/cardx@v0.3.1...v0.3.2

v0.3.1

Choose a tag to compare

@insights-engineering-bot insights-engineering-bot released this 04 Dec 21:31
  • Added the ard_emmeans_emmeans() function. (#317)
  • Renamed ard_emmeans_mean_difference() to ard_emmeans_contrast() to align with function naming conventions.
  • The ard_complex() function has been renamed to ard_mvsummary().

What's Changed

Full Changelog: insightsengineering/cardx@v0.3.0...v0.3.1

v0.3.0

Choose a tag to compare

@insights-engineering-bot insights-engineering-bot released this 28 Aug 16:23

New Features and Updates

  • Added function ard_tabulate_abnormal() to calculate ARDs for abnormality analyses. (#310)
  • Adding strata argument to ard_tabulate_max(). (#445, @jtalboys)
  • Added function ard_incidence_rate() to calculate ARDs for incidence rate estimation. (#234)

Lifecycle Changes

  • The following functions have been renamed.

    • ard_continuous() to ard_summary()
    • ard_categorical() to ard_tabulate()
    • ard_dichotomous() to ard_tabulate_value()
    • ard_categorical_max() to ard_tabulate_max()
  • Updating any fmt_fn references to fmt_fun for consistency.

    • Any function with an argument cardx::foo(fmt_fn) has been updated to cardx::foo(fmt_fun). The old syntax will continue to function, but with a deprecation warning to users.
    • 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 like cards::update_ard_fmt_fun(), this will be a breaking change.

Bug Fixes

  • Fix in ard_survival_survfit.data.frame() method where the stratifying variable was not correctly converted back to its original type.
  • Fix in ard_total_n.survey.design() to use update() instead of dplyr::mutate(), which sometimes caused a downstream issue.

What's Changed

New Contributors

Full Changelog: insightsengineering/cardx@v0.2.5...v0.3.0

v0.2.5

Choose a tag to compare

@insights-engineering-bot insights-engineering-bot released this 03 Jul 14:51
  • Adding strata argument to ard_categorical_max(). (#445, @jtalboys)

  • Added function ard_incidence_rate() to calculate ARDs for incidence rate estimation. (#234)

  • Updating any fmt_fn references to fmt_fun for consistency.

    • Any function with an argument cardx::foo(fmt_fn) has been updated to cardx::foo(fmt_fun). The old syntax will continue to function, but with a deprecation warning to users.
    • 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 like cards::update_ard_fmt_fun(), this will be a breaking change.
  • Fix in ard_survival_survfit.data.frame() method where the stratifying variable was not correctly converted back to its original type.

  • Fix in ard_total_n.survey.design() to use update() instead of dplyr::mutate(), which sometimes caused a downstream issue.

What's Changed

New Contributors

Full Changelog: insightsengineering/cardx@v0.2.4...v0.2.5

v0.2.4

Choose a tag to compare

@insights-engineering-bot insights-engineering-bot released this 12 Apr 02:54

New Features and Updates

  • Added function ard_stats_mantelhaen_test() to calculate ARDs for Cochran-Mantel-Haenszel test results using stats::mantelhaen.test(). (#238)
  • Added a ard_regression.data.frame() S3 method. Also converted ard_regression_basic() to an S3 generic and added a ard_regression_basic.data.frame() method (#287)
  • Specifying ard_survfit_survfit.data.frame(variables=NULL) now creates an unstratified survfit() model, where previously variables argument could not be empty. (#277)
  • The ard_survfit_survfit.data.frame(variables) now accepts tidyselect input. (#278)
  • Added conf.level and conf.type to ard_survival_survfit() results. (#218)
  • Added cards::as_cards_fun() to ard_emmeans_mean_difference() so when an error occurs the user gets an ARD with the expected ARD structure. (#132)

What's Changed

Full Changelog: insightsengineering/cardx@v0.2.3...v0.2.4

v0.2.3

Choose a tag to compare

@insights-engineering-bot insights-engineering-bot released this 24 Feb 19:28

New Features and Updates

  • Added function ard_categorical_max() to calculate categorical occurrence rates by maximum level per unique ID. (#240)

Other Updates

  • Little n is now returned with the results of the proportion_ci_*() functions, which then flows into the results of ard_proportion_ci(). (#256)
  • Added as_cards_fun() to ard_categorical_ci() so when there is an error, the user gets an ARD with the expected ARD structure. (#262)
  • Update in ard_categorical.survey.design() for factor variables that are all missing. These variables can now be tabulated, where previously this resulted in an error.
  • Update in ard_missing.survey.design() where we can now tabulate the missing rate of design variables, such as the weights.

Bug Fixes

  • Fixed a bug in ard_survival_survfit() causing an error when "=" character is present in stratification variable level labels. (#252)
  • Bug fix in ard_categorical_ci(denominator='cell') when missing values were present in the by variable.

What's Changed

New Contributors

Full Changelog: insightsengineering/cardx@v0.2.2...v0.2.3

v0.2.2

Choose a tag to compare

@insights-engineering-bot insights-engineering-bot released this 27 Nov 17:30
  • Added a data.frame method to ard_survival_survfit().
  • Added a warning for incorrect formula type to ard_survival_survfit(). (#223)
  • Implemented summary(extend=TRUE) in ard_survival_survfit() to return results for time points out of bounds. (#224)
  • Methods in the {survey} and {survival} packages do not retain inputs variables types in their outputs. We now are able retain these variable types in ARDs returned by ard_continuous.survey.design(), ard_categorical.survey.design(), ard_continuous_ci.survey.design(), ard_categorical_ci.survey.design(), and ard_survival_survfit.data.frame() (and notably, not in ard_survival_survfit.survfit()).

What's Changed

New Contributors

Full Changelog: insightsengineering/cardx@v0.2.1...v0.2.2

v0.2.1

Choose a tag to compare

@insights-engineering-bot insights-engineering-bot released this 03 Sep 04:20

New Features and Updates

  • Added S3 method ard_total_n.survey.design() which returns an ARD with both the survey-weighted and unweighted total sample size.
  • Added warning and error columns to ard_regression() output. (#148)
  • Implemented cards::as_card() where needed in the package to convert data frames to class 'card'. (#200)

Bug Fixes

  • Bug fix in ard_categorical.survey.design() where all unweighted statistics were returned, even in the case where they were explicitly not requested.

Lifecycle Changes

  • The bt(pattern), reformulate2(pattern_term), reformulate2(pattern_response) arguments have been deprecated and are now ignored. We now use make.names() to determine whether a column name needs to be wrapped in backticks. (#192)

What's Changed

Full Changelog: insightsengineering/cardx@v0.2.0...v0.2.1