-
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathREADME.Rmd
More file actions
65 lines (45 loc) · 2.48 KB
/
README.Rmd
File metadata and controls
65 lines (45 loc) · 2.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# crane <a href="https://insightsengineering.github.io/crane/"><img src='man/figures/logo.png' align="right" height="120" /></a>
<!-- start badges -->
[](https://github.com/insightsengineering/crane/actions/workflows/check.yaml)
[](https://insightsengineering.github.io/crane/)
[](https://raw.githubusercontent.com/insightsengineering/crane/_xml_coverage_reports/data/main/coverage.xml)
[](https://CRAN.R-project.org/package=crane)
[](https://github.com/insightsengineering/crane/tree/main)
<!-- end badges -->
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")`
## Examples
The package exports a gtsummary theme for reporting at Roche.
The theme sets function defaults to meet reporting requirements at Roche, making it simpler programmers to achieve the desired results without setting too many arguments.
The package also exports a wrapper for the `gtsummary::tbl_summary()` function with defaults more suited to reporting at Roche.
```{r example}
library(crane)
theme_gtsummary_roche()
tbl <- trial |>
tbl_roche_summary(by = trt, include = c(age, grade), nonmissing = "always")
```
```{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")
```
The package also exports functions for Roche adverse event reporting, functions for shift tables, and others.