diff --git a/README.md b/README.md index da63291d0..01863b7fe 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,75 @@ -# cardx cardx website +--- +editor_options: + markdown: + wrap: 72 +--- + +# cardx cardx website + [![R-CMD-check](https://github.com/insightsengineering/cardx/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/insightsengineering/cardx/actions/workflows/R-CMD-check.yaml) -[![Codecov test coverage](https://codecov.io/gh/insightsengineering/cardx/branch/main/graph/badge.svg)](https://app.codecov.io/gh/insightsengineering/cardx?branch=main) -[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental) - +[![Codecov test +coverage](https://codecov.io/gh/insightsengineering/cardx/branch/main/graph/badge.svg)](https://app.codecov.io/gh/insightsengineering/cardx?branch=main) +[![Lifecycle: +experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental) + This is the source repository of the `cardx` R package. +The {cardx} package is an extension of the {cards} package, providing +additional functions to create Analysis Results Data Objects (ARDs) +using the **R** programming language. The {cardx} package exports ARD +functions that uses utility functions from {cards} and statistical +functions from additional packages (such as {stats}, {aod}, {car}, +{survey}, etc.) to construct summary objects. + +Summary objects can be used to: + +- [**Generate Tables and visualizations for Regulatory Submission**] + easily in **R**. Perfect for presenting descriptive statistics, + statistical analyses, regressions, etc. and more. + +- [**Conduct Quality Control checks on existing Tables** ] in R. + Storing both the results and test parameters supports the re-use and + verification of data analyses. + +In the future, components of the {cards} package will be integrated +seamlessly with the {gtsummary} package for table creation. ARDs will be +a byproduct of {gtsummary} tables and ARDs will be acceptable input for +{gtsummary} functions as detailed in the image below: + + + ## Installation -The latest development version of `{cardx}` can directly be installed from GitHub by running the following: +The latest development version of `{cardx}` can directly be installed +from GitHub by running the following: -```r +``` r if (!require("pak")) install.packages("pak") pak::pak("insightsengineering/cardx") ``` + +## Examples + +### Summary Table + +Use +[`tbl_summary()`](https://www.danieldsjoberg.com/gtsummary/reference/tbl_summary.html) +to summarize a data frame. + +Example ttest: + +``` r +library(cardx) + +# summarize the data with our package +cards::ADSL |> + # keep two treatment arms for the t-test calculation + dplyr::filter(ARM %in% c("Placebo", "Xanomeline High Dose")) |> + cardx::ard_stats_t_test(by = ARM, variable = AGE) +``` + + diff --git a/man/figures/README-ard-gtsummary-workflow.png b/man/figures/README-ard-gtsummary-workflow.png new file mode 100755 index 000000000..da8b47e76 Binary files /dev/null and b/man/figures/README-ard-gtsummary-workflow.png differ diff --git a/man/figures/README-t_test_print_simple.png b/man/figures/README-t_test_print_simple.png new file mode 100755 index 000000000..26614accd Binary files /dev/null and b/man/figures/README-t_test_print_simple.png differ