An open API service indexing awesome lists of open source software.

https://github.com/insightsengineering/crane

Supplement to functions found in the {gtsummary} R package
https://github.com/insightsengineering/crane

gt r reproducible-research summary-statistics

Last synced: 11 months ago
JSON representation

Supplement to functions found in the {gtsummary} R package

Awesome Lists containing this project

README

          

---
output: github_document
---

```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```

# crane

[![Codecov test coverage](https://codecov.io/gh/insightsengineering/crane/graph/badge.svg)](https://app.codecov.io/gh/insightsengineering/crane)

The {crane} package provides supplementary functions to the {gtsummary} specifically for trial reporting in the pharmaceutical industry.

## Installation

You can install {crane} with the following code.

``` r
install.packages("crane")
```

Install the development version with `pak::pak("insightsengineering/crane")`

## Example

This is a basic example which shows you how to solve a common problem:

```{r example}
library(crane)
theme_gtsummary_roche()

tbl <- trial |>
tbl_roche_summary(by = trt, include = c(age, grade), nonmissing = "always") |>
add_blank_row()
```

```{r tbl_print_simple, include = FALSE}
# Had to manually save images in temp file, not sure if better way.
gt::gtsave(as_gt(tbl), file = "man/figures/README-tbl_print_simple-1.png")
```

```{r out.width = "40%", echo = FALSE}
knitr::include_graphics("man/figures/README-tbl_print_simple-1.png")
```