Please ensure that R version 3.6 or higher is installed on your computer. This is required to install the cardinal package and its dependencies. You can check your current version of R by running sessionInfo() within the R console.
Installing Package Dependencies
The cardinal package requires several packages available on CRAN.
To use the cardinal package, ensure you have these necessary package dependencies installed by running the following code:
Optionally, to run the examples provided within the cardinal package and on this site you can also install the random CDISC data package, which contains example datasets, by running the following:
Code
if (!require("random.cdisc.data")) install.packages("random.cdisc.data")
For more information on these packages, see the Additional Resources section below.
Installing the cardinal Package
To install the cardinal package, run the following line of code:
Code
if (!require("cardinal")) remotes::install_github("pharmaverse/cardinal")
Loading Data
The table functions provided by cardinal are designed to work with any datasets which adhere to CDISC standards. If you have access to CDISC data, load this into your R environment as usual to use when generating tables.
If you do not have access to CDISC data, or want to run the examples provided within the package, you can use the random.cdisc.data package to load a selection of datasets containing example synthetic randomized CDISC data. Datasets are stored in the package by name, prefixed by the letter "c" (for “cached”). For example, after loading the random.cdisc.data package you can access an ADSL dataset by running cadsl, or ADAE with cadae. This data is loaded in where necessary as part of the provided examples.
If you would like to request the addition of a new feature to a pre-existing function within cardinal, or would like a specific table template to be added, please file an issue on GitHub here or reach out to the cardinal team directly via our Slack channel here.
You can access the source code for all currently available functions in the cardinal GitHub repository here.
Additional Resources
See the following packages used by cardinal for more information:
random.cdisc.data: Example synthetic randomized CDISC datasets (required for examples only)
Source Code
---title: "Getting Started"toc: truetoc-depth: 4---### Environment Setup and Package Installation#### Environment SetupPlease ensure that R version 3.6 or higher is installed on your computer. This is required to install the `cardinal` package and its dependencies. You can check your current version of R by running `sessionInfo()` within the R console.#### Installing Package DependenciesThe `cardinal` package requires several packages available on CRAN.To use the `cardinal` package, ensure you have these necessary package dependencies installed by running the following code:```{r, echo=TRUE, eval=FALSE}if (!require("gtsummary")) install.packages("gtsummary")if (!require("cards")) install.packages("cards")if (!require("cardx")) install.packages("cardx")if (!require("formatters")) install.packages("formatters")if (!require("rtables")) install.packages("rtables")if (!require("rlistings")) install.packages("rlistings")if (!require("tern")) install.packages("tern")```Optionally, to run the examples provided within the `cardinal` package and on this site you can also install the random CDISC data package, which contains example datasets, by running the following:```{r, echo=TRUE, eval=FALSE}if (!require("random.cdisc.data")) install.packages("random.cdisc.data")```For more information on these packages, see the [Additional Resources](#additional-resources) section below.#### Installing the cardinal PackageTo install the `cardinal` package, run the following line of code:```{r, echo=TRUE, eval=FALSE}if (!require("cardinal")) remotes::install_github("pharmaverse/cardinal")```### Loading DataThe table functions provided by `cardinal` are designed to work with any datasets which adhere to CDISC standards. If you have access to CDISC data, load this into your R environment as usual to use when generating tables.If you do not have access to CDISC data, or want to run the examples provided within the package, you can use the `random.cdisc.data` package to load a selection of datasets containing example synthetic randomized CDISC data. Datasets are stored in the package by name, prefixed by the letter `"c"` (for "cached"). For example, after loading the `random.cdisc.data` package you can access an ADSL dataset by running `cadsl`, or ADAE with `cadae`. This data is loaded in where necessary as part of the provided examples.### Template NavigationA list of all templates currently available in `cardinal` is provided in the [Template Catalog](index-catalog.qmd), with tables designed based on the [FDA Standard Safety Tables and Figures: Integrated Guide](https://downloads.regulations.gov/FDA-2022-N-1961-0046/attachment_1.pdf).### Feature RequestsIf you would like to request the addition of a new feature to a pre-existing function within `cardinal`, or would like a specific table template to be added, please file an issue on GitHub [here](https://github.com/pharmaverse/cardinal/issues) or reach out to the cardinal team directly via our Slack channel [here](https://app.slack.com/client/T028PB489D3/C04MQS12MND).You can access the source code for all currently available functions in the `cardinal` GitHub repository [here](https://github.com/pharmaverse/cardinal/tree/main/R).### Additional Resources {#additional-resources}See the following packages used by `cardinal` for more information:- [`tern`](https://insightsengineering.github.io/tern): Clinical trials analysis functions- [`rtables`](https://insightsengineering.github.io/rtables): Table creation- [`rlistings`](https://insightsengineering.github.io/rlistings): Listing creation- [`formatters`](https://insightsengineering.github.io/formatters): Additional rendering formatting- [`random.cdisc.data`](https://insightsengineering.github.io/random.cdisc.data): Example synthetic randomized CDISC datasets (required for examples only)