-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.Rmd
98 lines (74 loc) · 3.23 KB
/
README.Rmd
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
---
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/",
out.width = "100%",
eval = FALSE
)
```
# ReportGenerator <img src="man/figures/logo.png" align="right" height="180" />
<!-- badges: start -->
[![R-CMD-check](https://github.com/darwin-eu-dev/ReportGenerator/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/darwin-eu-dev/ReportGenerator/actions/workflows/R-CMD-check.yaml)
[![Lifecycle:stable](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[![CRAN status](https://www.r-pkg.org/badges/version/ReportGenerator)](https://CRAN.R-project.org/package=ReportGenerator)
[![codecov](https://codecov.io/gh/darwin-eu-dev/ReportGenerator/graph/badge.svg?token=JPB6L2JMAN)](https://codecov.io/gh/darwin-eu-dev/ReportGenerator)
<!-- badges: end -->
## Overview
`ReportGenerator` creates automatic study reports from DARWIN EU® research. It is a Shiny app with an interactive menu where the user can select figures and tables from the Complete Catalogue of Standard Data Analyses.
## Installation
You can install the development version of ReportGenerator like so:
```{r}
install.packages("remotes")
remotes::install_github("darwin-eu-dev/ReportGenerator")
```
`reportGenerator()` takes as an input zip or csv files with results from IncidencePrevalence. To launch the Shiny app just type in the console:
```{r}
ReportGenerator::reportGenerator()
```
Alternatively, you can access to an [online version here](https://data-dev.darwin-eu.org/content/46c367cd-6e29-4382-9d7d-aff8caaa582a/).
Load your own results from the [IncidencePrevalence](https://darwin-eu.github.io/IncidencePrevalence/) or [TreatmentPatterns](https://darwin-eu-dev.github.io/TreatmentPatterns/) packages. ReportGenerator accepts data from the latest versions, but offers limited legacy support.
`ReportGenerator()` accepts files in ZIP format from multiple data partners, with the following directory structure, or CSV files to visualise individual results.
```
# IncidencePrevalence ZIP Folders
C:
|--results_CHUBX.zip
| |--incidence_attrition.csv
| |--prevalence_attrition.csv
| |--incidence_estimates.csv
| |--prevalence_estimates.csv
|
|--results_CPRD.zip
|--results_IMASIS.zip
|--results_IPCI.zip
# CSV files
C:
|
|--incidence_attrition.csv
|--prevalence_attrition.csv
|--incidence_estimates.csv
|--prevalence_estimates.csv
```
In the same way, the user can load results from TreatmentPatterns in ZIP format, including the metadata file to identify results from each data partner.
```
# Directory TreatmentPatterns
C:
|--results_CPRD.zip
| |--countsAge.csv
| |--countsSex.csv
| |--metadata.csv
| |--summaryStatsTherapyDuraion.csv
| |--treatmentPathways.csv
|
|--results_IMASIS.zip
|--results_IPCI.zip
|--results_SIDIAP.zip
```
To test the package, the user can generate some mock data with `ReportGenerator::generateMockData()`, which will create a "Results" folder with data in zip format.
```{r}
ReportGenerator::generateMockData()
```