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
- Host: GitHub
- URL: https://github.com/insightsengineering/crane
- Owner: insightsengineering
- Created: 2024-09-12T23:43:44.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-07-18T01:10:20.000Z (11 months ago)
- Last Synced: 2025-07-18T05:01:35.908Z (11 months ago)
- Topics: gt, r, reproducible-research, summary-statistics
- Language: R
- Homepage: https://insightsengineering.github.io/crane/
- Size: 6.52 MB
- Stars: 4
- Watchers: 5
- Forks: 1
- Open Issues: 20
-
Metadata Files:
- Readme: README.Rmd
- Changelog: NEWS.md
- Contributing: .github/CONTRIBUTING.md
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
[](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")
```